problem_id stringlengths 6 6 | language stringclasses 2
values | original_status stringclasses 3
values | original_src stringlengths 19 243k | changed_src stringlengths 19 243k | change stringclasses 3
values | i1 int64 0 8.44k | i2 int64 0 8.44k | j1 int64 0 8.44k | j2 int64 0 8.44k | error stringclasses 270
values | stderr stringlengths 0 226k |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repi(i, a, b) for (int i = (a); i < int(b); i++)
#define all(a) (a).beg... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repi(i, a, b) for (int i = (a); i < int(b); i++)
#define all(a) (a).beg... | replace | 88 | 90 | 88 | 90 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int MOD = 1e9 + 7;
signed main() {
int N, K;
cin >> N >> K;
typedef pair<int, int> P;
std::vector<P> v(N);
for (int i = 0; i < N; i++) {
int a, b;
cin >> a >> b;
a--;
v[i] = P(b, a);
}
sort(v.rbegin(), v.rend());
... | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int MOD = 1e9 + 7;
signed main() {
int N, K;
cin >> N >> K;
typedef pair<int, int> P;
std::vector<P> v(N);
for (int i = 0; i < N; i++) {
int a, b;
cin >> a >> b;
a--;
v[i] = P(b, a);
}
sort(v.rbegin(), v.rend());
... | replace | 30 | 31 | 30 | 31 | 0 | |
p03148 | Python | Runtime Error | from collections import defaultdict
from heapq import heappush, heappop
n, k = map(int, input().split())
dic = defaultdict(list)
for _ in range(n):
t, d = map(int, input().split())
dic[t].append(d)
maxs = []
for key in dic:
dic[key].sort()
maxs.append((dic[key].pop(), key))
maxs.sort(reverse=True)
q... | from collections import defaultdict
from heapq import heappush, heappop
n, k = map(int, input().split())
dic = defaultdict(list)
for _ in range(n):
t, d = map(int, input().split())
dic[t].append(d)
maxs = []
for key in dic:
dic[key].sort()
maxs.append((dic[key].pop(), key))
maxs.sort(reverse=True)
q... | insert | 25 | 25 | 25 | 28 | 0 | |
p03148 | Python | Runtime Error | from collections import deque
def main():
N, K = map(int, input().split())
sushis = [None] * N
for i in range(N):
t, d = map(int, input().split())
sushis[i] = (t, d)
sushis.sort(key=lambda a: (-a[1], a[0]))
tmp = 0
types = set()
stack = deque()
ans = 0
for i in rang... | from collections import deque
def main():
N, K = map(int, input().split())
sushis = [None] * N
for i in range(N):
t, d = map(int, input().split())
sushis[i] = (t, d)
sushis.sort(key=lambda a: (-a[1], a[0]))
tmp = 0
types = set()
stack = deque()
ans = 0
for i in rang... | replace | 22 | 23 | 22 | 23 | 0 | |
p03148 | Python | Runtime Error | import heapq
INF = float("inf")
n, k = map(int, input().split())
sushi = {}
for _ in range(n):
t, d = map(int, input().split())
if t not in sushi:
sushi[t] = []
sushi[t].append(d)
for s in sushi.values():
s.sort(reverse=True)
eat_counts = {s: 0 for s in sushi.keys()}
# まだ食べてないやつ
news = []
#... | import heapq
INF = float("inf")
n, k = map(int, input().split())
sushi = {}
for _ in range(n):
t, d = map(int, input().split())
if t not in sushi:
sushi[t] = []
sushi[t].append(d)
for s in sushi.values():
s.sort(reverse=True)
eat_counts = {s: 0 for s in sushi.keys()}
# まだ食べてないやつ
news = []
#... | replace | 50 | 51 | 50 | 51 | 0 | |
p03148 | Python | Runtime Error | N, K = map(int, input().split())
umai = {}
mazui = []
for _ in range(N):
t, d = map(int, input().split())
if t not in umai:
umai[t] = d
else:
tmp = umai[t]
if tmp < d:
umai[t] = d
mazui.append((t, tmp))
else:
mazui.append((t, d))
umai = so... | N, K = map(int, input().split())
umai = {}
mazui = []
for _ in range(N):
t, d = map(int, input().split())
if t not in umai:
umai[t] = d
else:
tmp = umai[t]
if tmp < d:
umai[t] = d
mazui.append((t, tmp))
else:
mazui.append((t, d))
umai = so... | replace | 28 | 31 | 28 | 32 | 0 | |
p03148 | Python | Runtime Error | def main():
n, k = map(int, input().split())
sushi = [list(map(int, input().split())) for _ in range(n)]
sushi = sorted(sushi, key=lambda x: x[1], reverse=True)
first = set()
second = []
point = 0
for s in sushi[:k]:
if s[0] not in first:
first.add(s[0])
else:
... | def main():
n, k = map(int, input().split())
sushi = [list(map(int, input().split())) for _ in range(n)]
sushi = sorted(sushi, key=lambda x: x[1], reverse=True)
first = set()
second = []
point = 0
for s in sushi[:k]:
if s[0] not in first:
first.add(s[0])
else:
... | insert | 18 | 18 | 18 | 20 | 0 | |
p03148 | C++ | Runtime Error | //{{{
#include <algorithm>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <sys/time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using ll = long long;
enu... | //{{{
#include <algorithm>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <sys/time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using ll = long long;
enu... | insert | 65 | 65 | 65 | 68 | 0 | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
// output
#define SPBR(w, n) std::cout << (w... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
// output
#define SPBR(w, n) std::cout << (w... | replace | 112 | 113 | 112 | 113 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n, k;
cin >> n >> k;
vector<vector<int>> v(n);
for (int i = 0; i < n; i++) {
int t, d;
cin >> t >> d;
v[t - 1].push_back(d);
}
vector<ll> a{0}, b{0};
for (auto &e : v) {
if (e.empty()) {
continue;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n, k;
cin >> n >> k;
vector<vector<int>> v(n);
for (int i = 0; i < n; i++) {
int t, d;
cin >> t >> d;
v[t - 1].push_back(d);
}
vector<ll> a{0}, b{0};
for (auto &e : v) {
if (e.empty()) {
continue;
... | replace | 33 | 34 | 33 | 35 | 0 | |
p03148 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ft first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define pt(sth) cout << sth << "\n"
#define chmax(a, b) \
{ ... | #include <bits/stdc++.h>
#define ft first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define pt(sth) cout << sth << "\n"
#define chmax(a, b) \
{ ... | replace | 55 | 57 | 55 | 56 | TLE | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <cstring>
#include <iterator>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#pragma warning(disable : 4996)
typedef long long ll;
#define MIN(a, b) ((a) > (b) ... | #include <algorithm>
#include <assert.h>
#include <cstring>
#include <iterator>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#pragma warning(disable : 4996)
typedef long long ll;
#define MIN(a, b) ((a) > (b) ... | insert | 49 | 49 | 49 | 53 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N, K;
cin >> N >> K;
vector<ll> t(N), d(N);
for (int i = 0; i < N; i++) {
cin >> t[i] >> d[i];
t[i]--;
}
vector<pair<ll, int>> A(N);
for (int i = 0; i < N; i++) {
A[i] = make_pair(d[i], t[i]);
}
sort(A.b... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N, K;
cin >> N >> K;
vector<ll> t(N), d(N);
for (int i = 0; i < N; i++) {
cin >> t[i] >> d[i];
t[i]--;
}
vector<pair<ll, int>> A(N);
for (int i = 0; i < N; i++) {
A[i] = make_pair(d[i], t[i]);
}
sort(A.b... | replace | 32 | 33 | 32 | 33 | 0 | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <functional>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
using ll = long long;
using pii = pair<ll, ll>;
ll n, k;
pii s[100000];
vector<ll> u, v;
int main() {
scanf("%lld %lld", &n, &k);
for (int i = 0; i < n; i++)
scanf("%lld %lld", &s[i].first, &s[... | #include <algorithm>
#include <functional>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
using ll = long long;
using pii = pair<ll, ll>;
ll n, k;
pii s[100000];
vector<ll> u, v;
int main() {
scanf("%lld %lld", &n, &k);
for (int i = 0; i < n; i++)
scanf("%lld %lld", &s[i].first, &s[... | replace | 27 | 29 | 27 | 34 | 0 | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility... | #include <algorithm>
#include <assert.h>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility... | replace | 33 | 34 | 33 | 37 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int count_and_compress(vector<long long> &a) {
vector<long long> b = a;
sort(b.begin(), b.end());
b.erase(unique(b.begin(), b.end()));
for (auto &e : a) {
e = (lower_bound(b.begin(), b.end(), e) - b.begin());
}
return b.size();
}
int main() {
int n, k;
... | #include <bits/stdc++.h>
using namespace std;
int count_and_compress(vector<long long> &a) {
vector<long long> b = a;
sort(b.begin(), b.end());
b.erase(unique(b.begin(), b.end()), b.end());
for (auto &e : a) {
e = (lower_bound(b.begin(), b.end(), e) - b.begin());
}
return b.size();
}
int main() {
in... | replace | 6 | 7 | 6 | 7 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).... | insert | 49 | 49 | 49 | 51 | 0 | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repb(i, a, b) for (int i = a; i < b; i++)
using namespace std;
typed... | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repb(i, a, b) for (int i = a; i < b; i++)
using namespace std;
typed... | replace | 30 | 31 | 30 | 31 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
const int MAXN = 100000;
vector<ll> sushi[MAXN + 1];
vector<ll> best;
vector<ll> rest;
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
ll n, k;
cin >> n >> k;
ll t[n], d[n];
for (int i = 0; i < n; ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
const int MAXN = 100000;
vector<ll> sushi[MAXN + 1];
vector<ll> best;
vector<ll> rest;
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
ll n, k;
cin >> n >> k;
ll t[n], d[n];
for (int i = 0; i < n; ... | replace | 41 | 42 | 41 | 44 | 0 | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <vector>
#define _USE_MATH_DEFINES
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#... | #include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <vector>
#define _USE_MATH_DEFINES
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#... | replace | 148 | 149 | 148 | 149 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define rep(i, a, n) for (int(i) = (int)(a); (i) < (int)(n); ++(i))
#define repe(i, a, n) for (int(i) = (int)(a); (i) <= (int)(n); ++(i))
#define repif(i, a, x) for (int(i) = (int)(a); (x); ++(i))
#define repr(i, a, n) for (int(i) = ((int)(a)-1); (i) >= (int)(n); --(i))
#d... | #include <bits/stdc++.h>
#define int long long
#define rep(i, a, n) for (int(i) = (int)(a); (i) < (int)(n); ++(i))
#define repe(i, a, n) for (int(i) = (int)(a); (i) <= (int)(n); ++(i))
#define repif(i, a, x) for (int(i) = (int)(a); (x); ++(i))
#define repr(i, a, n) for (int(i) = ((int)(a)-1); (i) >= (int)(n); --(i))
#d... | insert | 70 | 70 | 70 | 72 | 0 | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
using namespace std;
pair<long long, int> dt[100000];
int main() {
int N;
int K;
cin >> N >> K;
for (int i = 0; ... | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
using namespace std;
pair<long long, int> dt[100000];
int main() {
int N;
int K;
cin >> N >> K;
for (int i = 0; ... | insert | 53 | 53 | 53 | 54 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// --
#define HOGE \
std::cin.tie(0); \
std::ios::sync_with_stdio(false);
template <typename T> void CIN_VAR(T &t) { cin >> t; }
template <type... | #include <bits/stdc++.h>
using namespace std;
// --
#define HOGE \
std::cin.tie(0); \
std::ios::sync_with_stdio(false);
template <typename T> void CIN_VAR(T &t) { cin >> t; }
template <type... | replace | 98 | 99 | 98 | 99 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rep2(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define rev(i, n) for (int(i) = (n)-1; (i) >= 0; (i)--)
#define rev2(i, a, b) for (int(i) = (a)-1; (i) >= (b); (i)--)
#define rng(a) a.begin(), a.en... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rep2(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define rev(i, n) for (int(i) = (n)-1; (i) >= 0; (i)--)
#define rev2(i, a, b) for (int(i) = (a)-1; (i) >= (b); (i)--)
#define rng(a) a.begin(), a.en... | insert | 93 | 93 | 93 | 95 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
#define whlie while
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define rep(i, N) for (int i = 0; i < (N); i++)
#define repr(i, N) for (int i = (N)-1; i >= 0; i--)
#define rep1(i, N) for (int i = 1; i <= (N); i++)
#define repr1(i, N) for (int i = (N); i > 0; ... | #include <bits/stdc++.h>
#define whlie while
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define rep(i, N) for (int i = 0; i < (N); i++)
#define repr(i, N) for (int i = (N)-1; i >= 0; i--)
#define rep1(i, N) for (int i = 1; i <= (N); i++)
#define repr1(i, N) for (int i = (N); i > 0; ... | replace | 159 | 160 | 159 | 160 | 0 | |
p03148 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unistd.h>
#include <unordered_map>
#include <vector>
using... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unistd.h>
#include <unordered_map>
#include <vector>
using... | insert | 91 | 91 | 91 | 93 | TLE | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
typedef pair<int, int> P;
int main() {
int N, K;
cin >> N >> K;
P p[100000];
long s = 0;
int cnt[100001] = {0};
long ans = 0;
for (int i = 0; i < N; i++) {
int t, d;
cin >> t >> d;
p[i] = P(d, t);
}
sort(p, p... | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
typedef pair<int, int> P;
int main() {
int N, K;
cin >> N >> K;
P p[100000];
long s = 0;
int cnt[100001] = {0};
long ans = 0;
for (int i = 0; i < N; i++) {
int t, d;
cin >> t >> d;
p[i] = P(d, t);
}
sort(p, p... | replace | 31 | 32 | 31 | 32 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<int> v[100001];
int n, k;
int main() {
cin >> n >> k;
for (int i = 0; i < n; i++) {
ll t, d;
cin >> t >> d;
v[t].push_back(d);
}
// 種類数が増えない
vector<ll> ans0;
// 種類数が増える
vector<ll> ans1;
for (int i = 0; i <= n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<int> v[100001];
int n, k;
int main() {
cin >> n >> k;
for (int i = 0; i < n; i++) {
ll t, d;
cin >> t >> d;
v[t].push_back(d);
}
// 種類数が増えない
vector<ll> ans0;
// 種類数が増える
vector<ll> ans1;
for (int i = 0; i <= n; i++) {
... | delete | 40 | 42 | 40 | 40 | 0 | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long... | replace | 48 | 49 | 48 | 49 | 0 | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >... | #include <algorithm>
#include <iostream>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >... | insert | 44 | 44 | 44 | 46 | 0 | |
p03148 | C++ | Runtime Error | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define RFOR(i, a, b) for (int i = (a)-1; i >= (b); i--)
#define rrep(i, n) RFOR(i, n, 0)
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef ... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define RFOR(i, a, b) for (int i = (a)-1; i >= (b); i--)
#define rrep(i, n) RFOR(i, n, 0)
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef ... | insert | 66 | 66 | 66 | 68 | 0 | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <map>
#include <queue>
#include <vector>
using namespace std;
int n, k;
map<int, vector<int>> m;
vector<vector<int> *> v;
priority_queue<int> p;
int main() {
scanf("%d %d", &n, &k);
for (int i = 0; i < n; i++) {
int t, d;
scanf("%d %d", &t, &d);
m[t].pus... | #include <algorithm>
#include <cstdio>
#include <map>
#include <queue>
#include <vector>
using namespace std;
int n, k;
map<int, vector<int>> m;
vector<vector<int> *> v;
priority_queue<int> p;
int main() {
scanf("%d %d", &n, &k);
for (int i = 0; i < n; i++) {
int t, d;
scanf("%d %d", &t, &d);
m[t].pus... | replace | 46 | 47 | 46 | 47 | 0 | |
p03148 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define REP(n) for (int i = 0; i < n; i++)
int flowers[101] = {0};
bool pairCompare(const pair<int, long long> &firstElof,
const pair<int, long long> &secondElof) {
... | #include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define REP(n) for (int i = 0; i < n; i++)
int flowers[101] = {0};
bool pairCompare(const pair<int, long long> &firstElof,
const pair<int, long long> &secondElof) {
... | replace | 32 | 33 | 32 | 33 | 0 | |
p03149 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
#define mod 1000000007
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define f(p, n) for (ll i = p; i < n; i++)
ll exp(ll a, ll b, ll m);
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
#ifnd... | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
#define mod 1000000007
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define f(p, n) for (ll i = p; i < n; i++)
ll exp(ll a, ll b, ll m);
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll ... | delete | 16 | 20 | 16 | 16 | -7 | |
p03149 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
for (int i = 0; i < 4; i++) {
cin >> s.at(i);
}
sort(s.begin(), s.end());
string k = "NO";
if (s == "1479") {
k = "YES";
}
cout << k << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s = " ";
for (int i = 0; i < 4; i++) {
cin >> s.at(i);
}
sort(s.begin(), s.end());
string k = "NO";
if (s == "1479") {
k = "YES";
}
cout << k << endl;
return 0;
}
| replace | 4 | 5 | 4 | 5 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)
|
p03149 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int a;
string s = "";
for (int i = 0; i < 4; i++) {
cin >> a;
s.at(i) = '0' + a;
}
sort(s.begin(), s.end());
if (s == "1479") {
cout << "YES";
} else {
cout << "NO";
}
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int a;
string s = "9999";
for (int i = 0; i < 4; i++) {
cin >> a;
s.at(i) = '0' + a;
}
sort(s.begin(), s.end());
if (s == "1479") {
cout << "YES";
} else {
cout << "NO";
}
} | replace | 4 | 5 | 4 | 5 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)
|
p03149 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s.at(0) >> s.at(1) >> s.at(2) >> s.at(3);
sort(s.begin(), s.end());
if (s == "1479")
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s = "0000";
cin >> s.at(0) >> s.at(1) >> s.at(2) >> s.at(3);
sort(s.begin(), s.end());
if (s == "1479")
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | replace | 4 | 5 | 4 | 5 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)
|
p03149 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
int main() {
vector<int> N(4);
vector<int> hash_table(4, -1);
hash_table[1] = 1;
hash_table[9] = 1;
hash_table[7] = 1;
hash_table[4] = 1;
int cnt = 4;
for (int i = 0; i < 4; i++) {... | #include <algorithm>
#include <iostream>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
int main() {
vector<int> N(4);
vector<int> hash_table(10, -1);
hash_table[1] = 1;
hash_table[9] = 1;
hash_table[7] = 1;
hash_table[4] = 1;
int cnt = 4;
for (int i = 0; i < 4; i++) ... | replace | 9 | 10 | 9 | 10 | -6 | malloc(): corrupted top size
|
p03149 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> cnt(10);
for (int i = 0; 4; i++) {
int n;
cin >> n;
cnt.at(n)++;
}
if (cnt.at(1) == 1 && cnt.at(9) == 1 && cnt.at(7) == 1 && cnt.at(4))
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> cnt(10);
for (int i = 0; i < 4; i++) {
int n;
cin >> n;
cnt.at(n)++;
}
if (cnt.at(1) == 1 && cnt.at(9) == 1 && cnt.at(7) == 1 && cnt.at(4))
cout << "YES" << endl;
else
cout << "NO" << endl;
} | replace | 5 | 6 | 5 | 6 | TLE | |
p03149 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef gp_hash_table<long long, long long> umap;
#define fr(i, a, b) for (int i = (a), _b = (b); i <= _b; i++)
#define frr(i, a, b) for (int i = (a), _b = (b); i >= _b; i--)
#define ... | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef gp_hash_table<long long, long long> umap;
#define fr(i, a, b) for (int i = (a), _b = (b); i <= _b; i++)
#define frr(i, a, b) for (int i = (a), _b = (b); i >= _b; i--)
#define ... | delete | 131 | 135 | 131 | 131 | 0 | |
p03149 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
int main() {
std::vector<int> v;
std::vector<int> ans{1, 4, 7, 9};
for (int i = 0; i < 3; i++)
std::cin >> v[i];
std::sort(v.begin(), v.end());
if (v == ans) {
std::cout << "YES" << std::endl;
} else {
std::cout << "NO" << std::endl;
... | #include <algorithm>
#include <iostream>
#include <vector>
int main() {
std::vector<int> v(4, 0);
int org[] = {1, 4, 7, 9};
std::vector<int> ans(org, org + 4);
for (int i = 0; i < 4; i++)
std::cin >> v[i];
std::sort(v.begin(), v.end());
if (v == ans) {
std::cout << "YES" << std::endl;
} else {
... | replace | 5 | 8 | 5 | 9 | -11 | |
p03149 | Python | Runtime Error | print("YES" if set(map(int, input().split())) == set(1, 9, 7, 4) else "NO")
| print("YES" if set(list(map(int, input().split()))) == set([1, 9, 7, 4]) else "NO")
| replace | 0 | 1 | 0 | 1 | TypeError: set expected at most 1 argument, got 4 | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03149/Python/s697792206.py", line 1, in <module>
print('YES' if set(map(int, input().split())) == set(1, 9, 7, 4) else 'NO')
TypeError: set expected at most 1 argument, got 4
|
p03149 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
cin.tie(0)->sync_with_stdio(false);
vector<int> n(4);
REP(i, 4) cin >> n[i];
sort(n.begin(), n.end());
string s;
REP(i, 4) s.push_back(n[i]);
if (stoi(s) == 1479)
cout << "YES" << '\n';
els... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
cin.tie(0)->sync_with_stdio(false);
vector<char> n(4);
REP(i, 4) cin >> n[i];
sort(n.begin(), n.end());
string s;
REP(i, 4) s.push_back(n[i]);
if (stoi(s) == 1479)
cout << "YES" << '\n';
el... | replace | 7 | 8 | 7 | 8 | -6 | terminate called after throwing an instance of 'std::invalid_argument'
what(): stoi
|
p03149 | Python | Runtime Error | import sys
input = sys.stdin.readline
N = list(map(int, input().split())).sorted()
if N[0] == 1 and N[1] == 4 and N[2] == 7 and N[3] == 9:
print("YES")
else:
print("NO")
| import sys
input = sys.stdin.readline
N = sorted(list(map(int, input().split())))
if N[0] == 1 and N[1] == 4 and N[2] == 7 and N[3] == 9:
print("YES")
else:
print("NO")
| replace | 4 | 5 | 4 | 5 | AttributeError: 'list' object has no attribute 'sorted'. Did you mean: 'sort'? | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03149/Python/s741249337.py", line 4, in <module>
N = list(map(int, input().split())).sorted()
AttributeError: 'list' object has no attribute 'sorted'. Did you mean: 'sort'?
|
p03149 | C++ | Runtime Error | #include <bits/stdc++.h>
#define mk make_pair
using namespace std;
typedef long long ll;
const int N = 2e5 + 5;
const int mod = 1e9 + 7;
int n, a[N], b[N];
int main() {
for (int i = 0; i < 4; ++i)
cin >> a[i];
for (int i = 0; i < 4; ++i)
b[i] = i;
do {
if (a[b[0]] == 1 && a[b[1]] == 9 && a[b[2]] == 7 ... | #include <bits/stdc++.h>
#define mk make_pair
using namespace std;
typedef long long ll;
const int N = 2e5 + 5;
const int mod = 1e9 + 7;
int n, a[N], b[N];
int main() {
for (int i = 0; i < 4; ++i)
cin >> a[i];
for (int i = 0; i < 4; ++i)
b[i] = i;
do {
if (a[b[0]] == 1 && a[b[1]] == 9 && a[b[2]] == 7 ... | replace | 13 | 15 | 13 | 17 | 4 | |
p03150 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
#def... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
#def... | replace | 39 | 40 | 39 | 40 | 0 | |
p03150 | C++ | Runtime Error | // include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#... | // include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#... | replace | 690 | 691 | 690 | 691 | -11 | |
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
regex re[8];
re[0] = "keyence.*";
re[1] = "keyenc.*e";
re[2] = "keyen.*ce";
re[3] = "keye.*nce";
re[4] = "key.*ence";
re[5] = "ke.*yence";
re[6] = "k.*eyence";
re[7] = ".*keyence";
string s;
cin >> s;
bool ret = false;
for (int i = 0;... | #include <bits/stdc++.h>
using namespace std;
int main() {
regex re[8];
re[0] = "keyence.*";
re[1] = "keyenc.*e";
re[2] = "keyen.*ce";
re[3] = "keye.*nce";
re[4] = "key.*ence";
re[5] = "ke.*yence";
re[6] = "k.*eyence";
re[7] = ".*keyence";
string s;
cin >> s;
bool ret = false;
for (int i = 0;... | replace | 16 | 17 | 16 | 17 | 0 | |
p03150 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
char s[110];
int szS;
string target;
int main() {
scanf("%s", s);
szS = strlen(s);
string ss = s;
int delDepth = szS - 7;
if (delDepth == ... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
char s[110];
int szS;
string target;
int main() {
scanf("%s", s);
szS = strlen(s);
string ss = s;
int delDepth = szS - 7;
if (delDepth == ... | replace | 30 | 31 | 30 | 31 | 0 | |
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size(), a = 0;
if (n == 7)
cout << "YES" << endl;
else {
for (int i = 0; i < n - 7 + 1; i++) {
string t = s.substr(0, i) + s.substr(n + i - 7, 7 - i);
if (t == "keyence") {
a++;
cout <<... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size(), a = 0;
if (n == 7)
cout << "YES" << endl;
else {
for (int i = 0; i < 7; i++) {
string t = s.substr(0, i) + s.substr(n + i - 7, 7 - i);
if (t == "keyence") {
a++;
cout << "YES" <... | replace | 9 | 10 | 9 | 10 | 0 | |
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
const string keyword = "keyence";
string S;
cin >> S;
bool is_satisfied = false;
for (size_t len_head = 0; len_head <= keyword.size(); len_head++) {
size_t len_tail = keyword.size() - len_head;
if (S.substr(0, len_head) == keyword.substr(0, ... | #include <bits/stdc++.h>
using namespace std;
int main() {
const string keyword = "keyence";
string S;
cin >> S;
bool is_satisfied = false;
for (size_t len_head = 0; len_head <= keyword.size(); len_head++) {
size_t len_tail = keyword.size() - len_head;
if (S.substr(0, len_head) == keyword.substr(0, ... | replace | 12 | 13 | 12 | 14 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 8) > this->size() (which is 7)
|
p03150 | C++ | Runtime Error | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author aryssoncf
*/
// Taken from:
// https://github.com/bqi343/USACO/blob/master/Implementations/content/contest/templateShort.cpp
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long ... | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author aryssoncf
*/
// Taken from:
// https://github.com/bqi343/USACO/blob/master/Implementations/content/contest/templateShort.cpp
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long ... | replace | 116 | 117 | 116 | 117 | 0 | |
p03150 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main(void) {
string s;
cin >> s;
int n = s.length();
bool flag = false;
for (int i = 0; i <= n; ++i) {
if (s.substr(0, i) + s.substr(n - (7 - i)) == string("keyence"))
flag = true;
}
cout << (flag ? "YES" : "NO") << endl;
return ... | #include <iostream>
#include <string>
using namespace std;
int main(void) {
string s;
cin >> s;
int n = s.length();
bool flag = false;
for (int i = 0; i <= 7; ++i) {
if (s.substr(0, i) + s.substr(n - (7 - i)) == string("keyence"))
flag = true;
}
cout << (flag ? "YES" : "NO") << endl;
return ... | replace | 10 | 11 | 10 | 11 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 13) > this->size() (which is 12)
|
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, f, b, x;
cin >> s;
for (int i = 0; i < s.size() - 6; i++) {
f = s.substr(0, i - 0);
b = s.substr(f.size() + (s.size() - 7),
s.size() - (s.size() - 7 + f.size()));
x = f + b;
// cout<<f<<" "<<b<<endl;
if (x =... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, f, b, x;
cin >> s;
for (int i = 0; i < 8; i++) {
f = s.substr(0, i - 0);
b = s.substr(f.size() + (s.size() - 7),
s.size() - (s.size() - 7 + f.size()));
x = f + b;
// cout<<f<<" "<<b<<endl;
if (x == "keyence"... | replace | 6 | 7 | 6 | 7 | 0 | |
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
bool f() {
string s;
cin >> s;
string a = "keyence";
int l = s.size();
if (l < 7)
return false;
for (int i = 0; i < 8; i++) {
if (s.substr(0, i) != a.substr(0, i))
continue;
int j = 7 - i;
if (s.substr(l - 1 - j, j) == a.substr(6 - j, j))
... | #include <bits/stdc++.h>
using namespace std;
bool f() {
string s;
cin >> s;
string a = "keyence";
int l = s.size();
if (l < 7)
return false;
for (int i = 0; i < 8; i++) {
if (s.substr(0, i) != a.substr(0, i))
continue;
int j = 7 - i;
if (s.substr(l - j, j) == a.substr(7 - j, j))
... | replace | 14 | 15 | 14 | 15 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 18446744073709551615) > this->size() (which is 7)
|
p03150 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <ctype.h>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define dump(a) cout << (a) << '\n';
typedef long long Int;
Int mod = 1e9 + 7;
Int MOD = 998244353;
int m... | #include <algorithm>
#include <cmath>
#include <ctype.h>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define dump(a) cout << (a) << '\n';
typedef long long Int;
Int mod = 1e9 + 7;
Int MOD = 998244353;
int m... | replace | 22 | 24 | 22 | 24 | 0 | |
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define sort(s) sort(s.begin(), s.end())
#define reverse(s) reverse(s.begin(), s.end())
#define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++)
const ll mod = 1e9 + 7;
// 最大公約数
ll gcd(ll a, ll b) { return b ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define sort(s) sort(s.begin(), s.end())
#define reverse(s) reverse(s.begin(), s.end())
#define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++)
const ll mod = 1e9 + 7;
// 最大公約数
ll gcd(ll a, ll b) { return b ... | replace | 87 | 97 | 87 | 94 | 0 | |
p03150 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
bool f = 0;
cin >> s;
if (s == "keyence")
f = 1;
else if (s.size() > 7) {
for (int i = 0; i < s.size() - 7; i++) {
string t = s.substr(0, i) + s.substr(i + s.size() - 7, s.size());
if (t == "keyence") {
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
bool f = 0;
cin >> s;
if (s == "keyence")
f = 1;
else if (s.size() > 7) {
for (int i = 0; i < 7; i++) {
string t = s.substr(0, i) + s.substr(i + s.size() - 7, s.size());
if (t == "keyence") {
f = 1... | replace | 13 | 14 | 13 | 14 | 0 | |
p03150 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vec... | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vec... | replace | 42 | 43 | 42 | 43 | 0 | |
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vl;
typedef vector<string> vs;
typedef vector<char> vc;
typedef queue<ll> ql;
typedef deque<ll> dql;
typedef priority_queue<ll, vl /*, greater<ll>*/> pql; // 降順(/*昇順*/)
typedef set<ll> sl;
typedef pair<ll,... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vl;
typedef vector<string> vs;
typedef vector<char> vc;
typedef queue<ll> ql;
typedef deque<ll> dql;
typedef priority_queue<ll, vl /*, greater<ll>*/> pql; // 降順(/*昇順*/)
typedef set<ll> sl;
typedef pair<ll,... | replace | 45 | 50 | 45 | 48 | 0 | |
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pa = pair<ll, ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
const ll MOD = 1e9 + 7;
const ll INF = 1e14;
const long double EPS = 1e-11;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pa = pair<ll, ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
const ll MOD = 1e9 + 7;
const ll INF = 1e14;
const long double EPS = 1e-11;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0;... | replace | 30 | 31 | 30 | 31 | 0 | |
p03150 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
string S;
cin >> S;
int N = S.size();
int subN = N - 7;
if (subN < 0) {
cout << "NO" << endl;
return 0;
}
for (int i = 0; i < N; i++) {
string first = S.substr(0, i);
string middle = S.substr(i, subN);
string last ... | #include <iostream>
#include <string>
using namespace std;
int main() {
string S;
cin >> S;
int N = S.size();
int subN = N - 7;
if (subN < 0) {
cout << "NO" << endl;
return 0;
}
for (int i = 0; i < N - subN + 1; i++) {
string first = S.substr(0, i);
string middle = S.substr(i, subN);
s... | replace | 12 | 13 | 12 | 13 | 0 | |
p03150 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
int main() {
string s;
cin >> s;
// string key ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
int main() {
string s;
cin >> s;
// string key ... | replace | 25 | 26 | 25 | 27 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::erase: __pos (which is 7) > this->size() (which is 6)
|
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
for (int i = 0; i <= n - 7; i++) {
string t = s.substr(0, i) + s.substr(n - 7 + i, n);
if (t == "keyence") {
cout << "YES" << endl;
return 0;
}
}
cout << "NO" << end... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
for (int i = 0; i <= 7; i++) {
string t = s.substr(0, i) + s.substr(n - 7 + i);
if (t == "keyence") {
cout << "YES" << endl;
return 0;
}
}
cout << "NO" << endl;
re... | replace | 8 | 10 | 8 | 10 | 0 | |
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
int main() {
string k = "keyence";
string t;
cin >> t;
if (t.size() < k.size())
return 0 * printf("NO\n");
for (int i = 0; i < t.size() - k.size() + 1; i++) {
string s = t.substr(0, i) + t.sub... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
int main() {
string k = "keyence";
string t;
cin >> t;
if (t.size() < k.size())
return 0 * printf("NO\n");
for (int i = 0; i < k.size() + 1; i++) {
string s = t.substr(0, i) + t.substr(t.size(... | replace | 12 | 13 | 12 | 13 | 0 | |
p03150 | Python | Runtime Error | from re import fullmatch
S = input()
_s = "keyence"
flag = False
for i in range(len(_s)):
if fullmatch(f".*{_s[:i]}.*{_s[i:]}.*", S):
flag = True
print("YES") if flag else print("NO")
| from re import fullmatch
S = input()
_s = "keyence"
flag = False
for i in range(len(_s)):
tmp = fullmatch("(.*)" + _s[:i] + "(.*)" + _s[i:] + "(.*)", S)
if tmp and sum([1 for j in range(1, 4) if tmp.group(j)]) <= 1:
flag = True
print("YES") if flag else print("NO")
| replace | 6 | 7 | 6 | 8 | 0 | |
p03150 | Python | Runtime Error | S = str(input())
s = input()
for i in range(len(s)):
for j in range(i, len(s)):
a = s[:i] + s[j:]
if a == "keyence":
print("YES")
exit()
print("NO")
| s = str(input())
for i in range(len(s)):
for j in range(i, len(s)):
a = s[:i] + s[j:]
if a == "keyence":
print("YES")
exit()
print("NO")
| replace | 0 | 2 | 0 | 1 | EOFError: EOF when reading a line | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03150/Python/s743625929.py", line 2, in <module>
s = input()
EOFError: EOF when reading a line
|
p03150 | Python | Runtime Error | N = input()
S = "keyence"
index = 0
for item in N:
if S[index] == item:
index += 1
print("YES" if index == len(S) else "NO")
| N = input()
S = "keyence"
if S == N[: len(S)]:
print("YES")
elif S == N[-len(S) :]:
print("YES")
else:
for index in range(len(S)):
if S[:index] == N[:index] and S[-(len(S) - index) :] == N[-(len(S) - index) :]:
print("YES")
break
else:
print("NO")
| replace | 3 | 9 | 3 | 14 | 0 | |
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int len = (int)(S.size());
bool ans = false;
if (S.substr(0, 7) == "keyence" || S.substr(len - 7) == "keyence")
ans = true;
for (int i = 1; i < len - 1; i++) {
string a = S.substr(0, i);
string b = S.substr(len - 7 ... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int len = (int)(S.size());
bool ans = false;
if (S.substr(0, 7) == "keyence" || S.substr(len - 7) == "keyence")
ans = true;
for (int i = 1; i < 7; i++) {
string a = S.substr(0, i);
string b = S.substr(len - 7 + i);
... | replace | 11 | 12 | 11 | 12 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 13) > this->size() (which is 12)
|
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> p_int;
typedef pair<ll, ll> p_ll;
typedef tuple<ll, ll, ll> t3_ll;
int dx[] = {-1, 0, 1, 0}, dy[] = {0, 1, 0, -1};
int prime[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41,
43, 47, 53, 59, 61, 67, 71, 73,... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> p_int;
typedef pair<ll, ll> p_ll;
typedef tuple<ll, ll, ll> t3_ll;
int dx[] = {-1, 0, 1, 0}, dy[] = {0, 1, 0, -1};
int prime[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41,
43, 47, 53, 59, 61, 67, 71, 73,... | replace | 16 | 17 | 16 | 17 | 0 | |
p03150 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const char *key = "keyence";
const int keylen = 7;
int main() {
string str;
cin >> str;
int f, b;
for (f = 0; key[f] == str.at(f); f++)
;
for (b = 0; key[keylen - b - 1] == str.at(str.length() - b - 1); b++)
;
cout << ((f + b) >= keylen ? "YES" : "NO")... | #include <bits/stdc++.h>
using namespace std;
const char *key = "keyence";
const int keylen = 7;
int main() {
string str;
cin >> str;
int f, b;
for (f = 0; f < keylen; f++) {
if (key[f] != str.at(f))
break;
}
for (b = 0; b < keylen; b++) {
if (key[keylen - b - 1] != str.at(str.length() - b -... | replace | 10 | 14 | 10 | 18 | 0 | |
p03151 | C++ | Runtime Error | /*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <bits/stdc++.h>
// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
#define f(i, n) for (int i = 0; i < (n); i++)
#define inf (int)(3e18)
// here!!!
// ... | /*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <bits/stdc++.h>
// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
#define f(i, n) for (int i = 0; i < (n); i++)
#define inf (int)(3e18)
// here!!!
// ... | replace | 336 | 340 | 336 | 341 | -6 | munmap_chunk(): invalid pointer
|
p03151 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define uint unsigned int
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = (a); i >= (b); --i)
#define ALL(a) (a).begin(), (a).end()
#de... | #include <bits/stdc++.h>
#define int long long
#define uint unsigned int
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = (a); i >= (b); --i)
#define ALL(a) (a).begin(), (a).end()
#de... | replace | 73 | 86 | 73 | 82 | 0 | |
p03151 | C++ | Runtime Error | /*input
12
757232153 372327760 440075441 195848680 354974235 458054863 463477172 740174259
615762794 632963102 529866931 64991604 74164189 98239366 465611891 362739947
147060907 118867039 63189252 78303147 501410831 110823640 122948912 572905212
*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-pr... | /*input
12
757232153 372327760 440075441 195848680 354974235 458054863 463477172 740174259
615762794 632963102 529866931 64991604 74164189 98239366 465611891 362739947
147060907 118867039 63189252 78303147 501410831 110823640 122948912 572905212
*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-pr... | replace | 80 | 81 | 80 | 81 | 0 | |
p03151 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define rep(i, j, n) for (ll i = j; i < (n); i++)
#define CLR(mat, f) memset(mat, f, sizeof(mat))
#define IN(a, b, x) (a <= x && x < b)
#define out(ans) cout << ans << endl
typedef pair<ll, ll> P;
const ll mod = 1e9 + 7;
const int INF = 1000000;
const... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define rep(i, j, n) for (ll i = j; i < (n); i++)
#define CLR(mat, f) memset(mat, f, sizeof(mat))
#define IN(a, b, x) (a <= x && x < b)
#define out(ans) cout << ans << endl
typedef pair<ll, ll> P;
const ll mod = 1e9 + 7;
const int INF = 1000000;
const... | replace | 15 | 17 | 15 | 17 | -11 | |
p03151 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
pair<int, int> a[N];
bool cmp(pair<int, int> a, pair<int, int> b) {
return a.first - a.second > b.first - b.second;
}
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i].first;
for (int i = 0; i < n; i++)
cin >>... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
pair<int, int> a[N];
bool cmp(pair<int, int> a, pair<int, int> b) {
return a.first - a.second > b.first - b.second;
}
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i].first;
for (int i = 0; i < n; i++)
cin >>... | replace | 38 | 41 | 38 | 44 | TLE | |
p03151 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
... | #include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
... | replace | 23 | 24 | 23 | 24 | 0 | |
p03151 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
#define llint long long
using namespace std;
llint n;
llint a[10005], b[10005];
vector<llint> vec;
int main(void) {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++)
cin >> b[i];
llint sum = 0, ans = 0, need = 0;... | #include <algorithm>
#include <iostream>
#include <vector>
#define llint long long
using namespace std;
llint n;
llint a[100005], b[100005];
vector<llint> vec;
int main(void) {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++)
cin >> b[i];
llint sum = 0, ans = 0, need = ... | replace | 8 | 9 | 8 | 9 | 0 | |
p03151 | C++ | Runtime Error | #pragma GCC optimize(2)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1000;
int a[N], b[N], c[N];
inline int read() {
int x = 0, f = 1;
char ch = getchar();
for (; ch < '0' || ch > '9'; ch = getchar())
if (ch == '-')
f = -1;
for (; ch >= '0' && ch <= '9'; ch = getch... | #pragma GCC optimize(2)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 100005;
int a[N], b[N], c[N];
inline int read() {
int x = 0, f = 1;
char ch = getchar();
for (; ch < '0' || ch > '9'; ch = getchar())
if (ch == '-')
f = -1;
for (; ch >= '0' && ch <= '9'; ch = get... | replace | 4 | 5 | 4 | 5 | 0 | |
p03151 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
int main() {
long long N, A[100], B[100], SumA = 0, SumB = 0, C[100], rest = 0, result = 0;
std::cin >> N;
for (int i = 0; i < N; i++) {
std::cin >> A[i];
SumA += A[i];
}
for (int i = 0; i < N; i++) {
std::cin >> B[i];
SumB += B[i];
C[i] = A[i] - B[... | #include <algorithm>
#include <iostream>
int main() {
long long N, A[100000], B[100000], SumA = 0, SumB = 0, C[100000], rest = 0,
result = 0;
std::cin >> N;
for (int i = 0; i < N; i++) {
std::cin >> A[i];
SumA += A[i];
}
for (int i = 0; i < N; i++) {
std::cin >... | replace | 3 | 4 | 3 | 5 | 0 | |
p03151 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long A[20000];
long B[20000];
long d[20000];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
for (int n = 0; n < N; n++)
cin >> A[n];
for (int n = 0; n < N; n++)
cin >> B[n];
for (int n = 0; n < N; n++)
d[n] = A[n] - B[n];
... | #include <bits/stdc++.h>
using namespace std;
long A[200000];
long B[200000];
long d[200000];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
for (int n = 0; n < N; n++)
cin >> A[n];
for (int n = 0; n < N; n++)
cin >> B[n];
for (int n = 0; n < N; n++)
d[n] = A[n] - B[n... | replace | 3 | 6 | 3 | 6 | 0 | |
p03151 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (n); i++)
#define mp(x, y) make_pair(x, y)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using vin = vector<int>;
using P = pair<int, int>;
const int inf = 1e9 + 7;
const ll INF = 1e18;
int main() {... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (n); i++)
#define mp(x, y) make_pair(x, y)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using vin = vector<int>;
using P = pair<int, int>;
const int inf = 1e9 + 7;
const ll INF = 1e18;
int main() {... | replace | 38 | 42 | 38 | 44 | TLE | |
p03151 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
#define int long long int
#define rep(i, n) for (int i = 0; i < (n)... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
#define int long long int
#define rep(i, n) for (int i = 0; i < (n)... | replace | 28 | 29 | 28 | 29 | TLE | |
p03151 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i, x, n) for (int i = x; i < (int)(n); ++i)
int const N = 100000;
int a[N + 1], b[N];
int main() {
int n;
scanf("%d", &n);
f(i, 0, n) scanf("%d", a + i);
f(i, 0, n) scanf("%d", b + i);
ll c = 0;
f(i, 0, n) c += b[i] - a[i];
if ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i, x, n) for (int i = x; i < (int)(n); ++i)
int const N = 100000;
int a[N + 1], b[N];
int main() {
int n;
scanf("%d", &n);
f(i, 0, n) scanf("%d", a + i);
f(i, 0, n) scanf("%d", b + i);
ll c = 0;
f(i, 0, n) c += b[i] - a[i];
if ... | replace | 15 | 16 | 15 | 16 | TLE | |
p03151 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n), b(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; i++) {
cin >> b[i];
}
vector<int64_t> plus;
int64_t sumOfMinus = 0;
int... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n), b(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; i++) {
cin >> b[i];
}
vector<int64_t> plus;
int64_t sumOfMinus = 0;
int... | replace | 29 | 30 | 29 | 30 | 0 | |
p03151 | C++ | Runtime Error | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
// #include<bits/extc++.h>
using namespace std;
// using namespace __gnu_pbds;
// typedef
// tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
// set_t;
#define mp(a, b) make_pair((a), (b))
#define pii pair<int, int>
#define pll pair<LL, L... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
// #include<bits/extc++.h>
using namespace std;
// using namespace __gnu_pbds;
// typedef
// tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
// set_t;
#define mp(a, b) make_pair((a), (b))
#define pii pair<int, int>
#define pll pair<LL, L... | replace | 26 | 28 | 26 | 28 | 0 | |
p03151 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
using namespace std;
typedef long long ll;
... | #include <bits/stdc++.h>
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
using namespace std;
typedef long long ll;
... | replace | 71 | 72 | 71 | 72 | 0 | |
p03151 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | replace | 93 | 94 | 93 | 94 | -6 | 24: v= [ -1, -1, 4 ]
264752b6-3d12-49fd-8f2a-5aba49c9b292.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03151/C++/s557492168.cpp:44: int main(): Assertion `0' failed.
|
p03152 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define SIZE 1005
#define MOD 1000000007
using namespace std;
typedef long long int ll;
typedef pair<... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define SIZE 1000005
#define MOD 1000000007
using namespace std;
typedef long long int ll;
typedef pa... | replace | 12 | 13 | 12 | 13 | 0 | |
p03152 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <time.h>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long lon... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <time.h>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long lon... | replace | 39 | 40 | 39 | 40 | 0 | |
p03152 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__... | replace | 212 | 213 | 212 | 213 | 0 | |
p03152 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using vll = vector<ll>;
using pl4 = pair<ll, ll>;
using str = string;
using vpl4 = vector<pair<ll, ll>>;
#define sz size()
#define be begin()
#define en end()
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define llin... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using vll = vector<ll>;
using pl4 = pair<ll, ll>;
using str = string;
using vpl4 = vector<pair<ll, ll>>;
#define sz size()
#define be begin()
#define en end()
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define llin... | replace | 42 | 43 | 42 | 43 | 0 | |
p03152 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#incl... | #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#incl... | replace | 66 | 67 | 66 | 67 | 0 | |
p03152 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define FOR(i, n, m) for (int i = n; i <= (int)(m); i++)
#define RFOR(i, n, m) for (int i = (int)(n); i >= m; i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) int(x.size())
ty... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define FOR(i, n, m) for (int i = n; i <= (int)(m); i++)
#define RFOR(i, n, m) for (int i = (int)(n); i >= m; i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) int(x.size())
ty... | replace | 23 | 24 | 23 | 24 | 0 | |
p03152 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<in... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<in... | replace | 30 | 31 | 30 | 31 | 0 | |
p03152 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
typedef pair<int, int> ii;
const int N = 1e3 + 5, mod = 1e9 + 7;
int n, m, cntR[N], cntC[N], a[N], b[N], row, col, ans = 1;
ii pos[N * N];
int main() {
scanf("%d %d", &n, &m);
for (int i = 1; i <= n; ++i) {
scanf("%d", a + i);
... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
typedef pair<int, int> ii;
const int N = 1e3 + 5, mod = 1e9 + 7;
int n, m, cntR[N * N], cntC[N * N], a[N], b[N], row, col, ans = 1;
ii pos[N * N];
int main() {
scanf("%d %d", &n, &m);
for (int i = 1; i <= n; ++i) {
scanf("%d", ... | replace | 9 | 10 | 9 | 10 | 0 | |
p03152 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define INF 10e17 // 4倍しても(4回足しても)long longを溢れない
#define rep(i, n) ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define INF 10e17 // 4倍しても(4回足しても)long longを溢れない
#define rep(i, n) ... | replace | 29 | 30 | 29 | 30 | 0 | |
p03152 | C++ | Runtime Error | #ifndef BZ
#pragma GCC optimize "-O3"
#endif
#include <bits/stdc++.h>
#define FASTIO
#define ALL(v) (v).begin(), (v).end()
#define rep(i, l, r) for (int i = (l); i < (r); ++i)
#ifdef FASTIO
#define scanf abacaba
#define printf abacaba
#endif
typedef long long ll;
typedef long double ld;
typedef unsigned long long ul... | #ifndef BZ
#pragma GCC optimize "-O3"
#endif
#include <bits/stdc++.h>
#define FASTIO
#define ALL(v) (v).begin(), (v).end()
#define rep(i, l, r) for (int i = (l); i < (r); ++i)
#ifdef FASTIO
#define scanf abacaba
#define printf abacaba
#endif
typedef long long ll;
typedef long double ld;
typedef unsigned long long ul... | replace | 29 | 30 | 29 | 30 | 0 | |
p03152 | C++ | Runtime Error | #include <bits/stdc++.h>
// #define int long long
#define pii pair<int, int>
#define x1 x1228
#define y1 y1228
#define left left228
#define right right228
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ff first
#define ss second
#define matr vector<vector<int>>
#define all(x) x.begin... | #include <bits/stdc++.h>
// #define int long long
#define pii pair<int, int>
#define x1 x1228
#define y1 y1228
#define left left228
#define right right228
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ff first
#define ss second
#define matr vector<vector<int>>
#define all(x) x.begin... | replace | 28 | 29 | 28 | 29 | 0 | |
p03152 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e3 + 10, mod = 1e9 + 7;
int n, m, ans = 1, ar[2][N], mark[N * N];
int32_t main() {
cin >> n >> m;
for (int j = 0; j < n; j++) {
cin >> ar[0][j];
if (ar[0][j] > n * m || mark[ar[0][j]])
return cout << 0, 0;
mark[a... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e3 + 10, mod = 1e9 + 7;
int n, m, ans = 1, ar[2][N], mark[N * N];
int32_t main() {
cin >> n >> m;
for (int j = 0; j < n; j++) {
cin >> ar[0][j];
if (ar[0][j] > n * m || mark[ar[0][j]])
return cout << 0, 0;
mark[a... | replace | 34 | 36 | 34 | 36 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.