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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02772 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define R(i, n) for (int i = 0; i < n; i++)
#define S(a) scanf("%d", &a)
#define S2(a, b) scanf("%d%d", &a, &b)
#define S3(a, b, c) scanf("%d%d%d", &a, &b, &c)
#define P(a) printf("%d", a)
#def... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define R(i, n) for (int i = 0; i < n; i++)
#define S(a) scanf("%d", &a)
#define S2(a, b) scanf("%d%d", &a, &b)
#define S3(a, b, c) scanf("%d%d%d", &a, &b, &c)
#define P(a) printf("%d", a)
#def... | replace | 22 | 23 | 22 | 23 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, k, mx, i;
string b[100005];
string s[100005];
map<string, int> m, f;
int main() {
cin >> n;
for (k = 1; k <= n; k++) {
cin >> s[k];
m[s[k]]++;
mx = max(m[s[k]], mx);
}
for (k = 1; k <= n; k++) {
if (m[s[k]] == mx && f[s[k]] == 0) {
i++;... | #include <bits/stdc++.h>
using namespace std;
int n, k, mx, i;
string b[200005];
string s[200005];
map<string, int> m, f;
int main() {
cin >> n;
for (k = 1; k <= n; k++) {
cin >> s[k];
m[s[k]]++;
mx = max(m[s[k]], mx);
}
for (k = 1; k <= n; k++) {
if (m[s[k]] == mx && f[s[k]] == 0) {
i++;... | replace | 3 | 5 | 3 | 5 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
int main(void) {
int N;
vector<string> s(20000);
unordered_map<string, int> mp;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> s[i];
}
mp[s[0]] = 1;
for (int i = 1; i < N; i+... | #include <algorithm>
#include <iostream>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
int main(void) {
int N;
vector<string> s(200000);
unordered_map<string, int> mp;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> s[i];
}
mp[s[0]] = 1;
for (int i = 1; i < N; i... | replace | 10 | 11 | 10 | 11 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <cstring>
#include <iostream>
#include <stdio.h>
using namespace std;
string vote[200000], temp;
int cot[200000];
int sol[200000];
string ans[200000];
int main() {
int n, i, j, k, ma;
cin >> n;
for (i = 0; i < n; i++)
cot[i] = 1;
for (i = 0; i < n; i++) {
cin >> vote[i];
... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <stdio.h>
using namespace std;
string vote[2000000], temp;
int cot[2000000];
int sol[2000000];
string ans[2000000];
int main() {
int n, i, j, k, ma;
cin >> n;
for (i = 0; i < n; i++)
cot[i] = 1;
for (i = 0; i < n; i++) {
cin >> vote[i]... | replace | 5 | 9 | 5 | 9 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <cstdint>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
ll ans, mx, sum, mn = 1e8, cnt;
string c[1000];
ll idx;
int main() {
... | #include <algorithm>
#include <cstdint>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
ll ans, mx, sum, mn = 1e8, cnt;
string c[200001];
ll idx;
int main() {
... | replace | 17 | 18 | 17 | 18 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (auto &&a : s)
cin >> a;
sort(s.begin(), s.end());
// for(auto&& a : s)cout << a << endl;
int count = 0, max = 0, j = 0;
int memo[200000][2];
for (int i = 0; i < n; i++) {
count++;
if (s[i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (auto &&a : s)
cin >> a;
sort(s.begin(), s.end());
// for(auto&& a : s)cout << a << endl;
int count = 0, max = 0, j = 0;
int memo[200000][2];
for (int i = 0; i < n; i++) {
count++;
if (i +... | replace | 15 | 16 | 15 | 26 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fs first
#define se second
#define M 1000000007
vector<ll> tree(100000, LLONG_MAX);
void build(ll s, ll e, ll p, vector<ll> &arr) {
if (s == e) {
tree[p] = arr[s];
return;
}
ll mid = (s + e) / 2;
build(s, m... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fs first
#define se second
#define M 1000000007
vector<ll> tree(100000, LLONG_MAX);
void build(ll s, ll e, ll p, vector<ll> &arr) {
if (s == e) {
tree[p] = arr[s];
return;
}
ll mid = (s + e) / 2;
build(s, m... | replace | 53 | 54 | 53 | 54 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define srep(i, n, m) for (int i = n; i < m; i++)
#define elif else if
#define INF 1000000007
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int n, m = -1, a = 0, aa[110000], ... | #include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define srep(i, n, m) for (int i = n; i < m; i++)
#define elif else if
#define INF 1000000007
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int n, m = 0, a = 0, aa[110000], c... | replace | 12 | 13 | 12 | 13 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
// #define MOD 998244353
#define INF 1145141919810893364
// #define INF 810114514
// #define PI 3.141592653589
typedef pair<int, int> PP;
typedef long long ll;
#define int ll
#define setdouble setprecision
#define REP(i, n) for (int i = 0; i < (n); ++... | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
// #define MOD 998244353
#define INF 1145141919810893364
// #define INF 810114514
// #define PI 3.141592653589
typedef pair<int, int> PP;
typedef long long ll;
#define int ll
#define setdouble setprecision
#define REP(i, n) for (int i = 0; i < (n); ++... | replace | 24 | 25 | 24 | 25 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 10;
int n;
string s[N];
map<string, int> mp;
int main() {
cin >> n;
int ma = 0;
for (int i = 1; i <= n; i++) {
cin >> s[i];
mp[s[i]]++;
ma = max(ma, mp[s[i]]);
}
for (auto it = mp.begin(); it != mp.end(); it++)... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e5 + 10;
int n;
string s[N];
map<string, int> mp;
int main() {
cin >> n;
int ma = 0;
for (int i = 1; i <= n; i++) {
cin >> s[i];
mp[s[i]]++;
ma = max(ma, mp[s[i]]);
}
for (auto it = mp.begin(); it != mp.end(); it++)... | replace | 3 | 4 | 3 | 4 | 0 | |
p02773 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define endl "\n"
typedef long long ll;
const double pi = 3.14159265358979323846;
int ctoi(const char c) {
if ('0' <= c && c <= '9')
return (c - '0');
return -1;
}
vector<int> input(int n) {
vector<int> vec... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define endl "\n"
typedef long long ll;
const double pi = 3.14159265358979323846;
int ctoi(const char c) {
if ('0' <= c && c <= '9')
return (c - '0');
return -1;
}
vector<int> input(int n) {
vector<int> vec... | replace | 261 | 266 | 261 | 262 | TLE | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
x = 0;
char c = getchar();
while (!isdigit(c))
c = getchar();
while (isdigit(c))
x = x * 10 + c - '0', c = getchar();
}
map<string, int> mp;
set<pair<int, string>> s;
string tp[1005];
int main() {
ios::sync_with_stdio(false);
c... | #include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
x = 0;
char c = getchar();
while (!isdigit(c))
c = getchar();
while (isdigit(c))
x = x * 10 + c - '0', c = getchar();
}
map<string, int> mp;
set<pair<int, string>> s;
string tp[200005];
int main() {
ios::sync_with_stdio(false);
... | replace | 12 | 13 | 12 | 13 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#define INF 0x3f3f3f3f;
using namespace std;
string s[200005];
bool cmp(string a, string b) { return a.compare(b) < 1; }
int main() {
int n, i;
scanf("%d", &n);
for (i = 0; i < n; i++)
cin >> s[... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#define INF 0x3f3f3f3f;
using namespace std;
string s[200005];
bool cmp(string a, string b) { return a.compare(b) < 0; }
int main() {
int n, i;
scanf("%d", &n);
for (i = 0; i < n; i++)
cin >> s... | replace | 11 | 12 | 11 | 13 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
inline long long read() {
long long s = 0, w = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
w = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
s = s * 10 + ch - '0';
ch = getchar();
}
return s * w;
}
cons... | #include <bits/stdc++.h>
using namespace std;
inline long long read() {
long long s = 0, w = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
w = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
s = s * 10 + ch - '0';
ch = getchar();
}
return s * w;
}
cons... | replace | 17 | 18 | 17 | 18 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main(void) {
int N;
scanf("%d", &N);
string word;
vector<string> v1;
vector<string> v2;
vector<int> c1;
for (int i = 0; i < N; i++) {
cin >> wo... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main(void) {
int N;
scanf("%d", &N);
string word;
vector<string> v1;
vector<string> v2;
vector<int> c1;
for (int i = 0; i < N; i++) {
cin >> wo... | delete | 45 | 46 | 45 | 45 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <vector>
// #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr long long int INFLL = 1001001001001001LL... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <vector>
// #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr long long int INFLL = 1001001001001001LL... | replace | 67 | 68 | 67 | 68 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll N;
cin >> N;
vector<string> vec(N);
for (ll i = 0; i < N; i++) {
cin >> vec.at(i);
}
sort(vec.begin(), vec.end());
ll a = 0;
vector<ll> veco(1);
vector<string> ve(1);
ve.at(0) = vec.at(0);
for (ll i = 1; i < N;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll N;
cin >> N;
vector<string> vec(N);
for (ll i = 0; i < N; i++) {
cin >> vec.at(i);
}
sort(vec.begin(), vec.end());
ll a = 0;
vector<ll> veco(1);
vector<string> ve(1);
ve.at(0) = vec.at(0);
for (ll i = 1; i < N;... | replace | 25 | 26 | 25 | 26 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
|
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void) {
ios::sync_with_stdio(false);
int n;
cin >> n;
string arr[n];
int i = 0;
int j = 0;
int max = 0;
string winner[n + 1];
int count = 1;
while (i < n)
cin >> arr[i++];
sort(arr, arr + n);
arr[n] = "";
i = 1;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void) {
ios::sync_with_stdio(false);
int n;
cin >> n;
string arr[n + 1];
int i = 0;
int j = 0;
int max = 0;
string winner[n + 1];
int count = 1;
while (i < n)
cin >> arr[i++];
sort(arr, arr + n);
arr[n] = "";
i =... | replace | 8 | 9 | 8 | 9 | -11 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
int n;
cin >> n;
vector<string> s(n);
vector<pair<int, string>> a;
rep(i, n) { cin >> s[i]; }
sort(s.b... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
int n;
cin >> n;
vector<string> s(n);
vector<pair<int, string>> a;
rep(i, n) { cin >> s[i]; }
sort(s.b... | insert | 14 | 14 | 14 | 16 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <vector>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int64_t i = 0; i < (int64_t)(n); i++)
us... | #include <algorithm>
#include <bitset>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <vector>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int64_t i = 0; i < (int64_t)(n); i++)
us... | replace | 52 | 53 | 52 | 53 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rb(a, b, c) for (int a = b; a <= c; a++)
#define rl(a, b, c) for (int a = b; a >= c; a--)
#define vbe(v) v.begin()
#define ven(v) v.end()
#define all(v) v.begin(), v.end()
#define ll long long
#define vi vector<int>
#define vf vector<float>
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rb(a, b, c) for (int a = b; a <= c; a++)
#define rl(a, b, c) for (int a = b; a >= c; a--)
#define vbe(v) v.begin()
#define ven(v) v.end()
#define all(v) v.begin(), v.end()
#define ll long long
#define vi vector<int>
#define vf vector<float>
... | replace | 33 | 34 | 33 | 35 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#include <map>
#include <string.h>
char s1[100000][15];
int main() {
ll test, i, j = 0, k, m;
map<string, ll> mp;
cin >> k;
for (i = 0; i < k; i++) {
cin >> s1[i];
mp[s1[i]]++;
}
ll mx = 0;
for (i = 0; i < k; i++) {
mx = ma... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#include <map>
#include <string.h>
char s1[300000][15];
int main() {
ll test, i, j = 0, k, m;
map<string, ll> mp;
cin >> k;
for (i = 0; i < k; i++) {
cin >> s1[i];
mp[s1[i]]++;
}
ll mx = 0;
for (i = 0; i < k; i++) {
mx = ma... | replace | 5 | 6 | 5 | 6 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
string s[200000], a[20000];
int num[200000];
for (int i = 0; i < n; i++) {
cin >> s[i];
num[i] = 0;
}
sort(s, s + n);
int j = 0;
for (int i = 0; i < n; i++) {
... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
string s[200000], a[200000];
int num[200000];
for (int i = 0; i < n; i++) {
cin >> s[i];
num[i] = 0;
}
sort(s, s + n);
int j = 0;
for (int i = 0; i < n; i++) {
... | replace | 9 | 10 | 9 | 10 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <s... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <s... | replace | 66 | 82 | 66 | 76 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
using namespace std;
typedef long long ll;
ll ans;
ll N;
string S[20005];
vector<ll> A;
int main() {
cin >> N;
for (int i = 0; i < N; i++) {
cin >> S[i];
}
sort(S, S + N);
int cnt ... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
using namespace std;
typedef long long ll;
ll ans;
ll N;
string S[200005];
vector<ll> A;
int main() {
cin >> N;
for (int i = 0; i < N; i++) {
cin >> S[i];
}
sort(S, S + N);
int cnt... | replace | 11 | 12 | 11 | 12 | 0 | |
p02773 | C++ | Runtime Error | // #pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#define String std::string
#define fi first
#define se second
#define mp std::make_pair
#define Pair std::pair<int, int>
#define Map std::map<int, int>
#define Vector std::vector<int>
using std::cin;
using std::cout;
using std::endl;
typedef long ... | // #pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#define String std::string
#define fi first
#define se second
#define mp std::make_pair
#define Pair std::pair<int, int>
#define Map std::map<int, int>
#define Vector std::vector<int>
using std::cin;
using std::cout;
using std::endl;
typedef long ... | replace | 47 | 48 | 47 | 48 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
map<string, int> d;
string a[100010];
set<string> q;
int n, j, maxn;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
string x;
cin >> x;
if (q.count(x) == 0)
a[++j] = x;
q.insert(a[j]);
d[x]++;
maxn = max(d[x], maxn);
}
sor... | #include <bits/stdc++.h>
using namespace std;
map<string, int> d;
string a[1000010];
set<string> q;
int n, j, maxn;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
string x;
cin >> x;
if (q.count(x) == 0)
a[++j] = x;
q.insert(a[j]);
d[x]++;
maxn = max(d[x], maxn);
}
so... | replace | 3 | 4 | 3 | 4 | 0 | |
p02773 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
void sort(int n, string *a) {
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (a[i] > a[j]) {
string temp;
temp = a[j];
a[j] = a[i];
a[i] = temp;
}
}
}
return;
}
int main() {
int n;
cin >> n... | #include <bits/stdc++.h>
using namespace std;
void sort(int n, string *a) {
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (a[i] > a[j]) {
string temp;
temp = a[j];
a[j] = a[i];
a[i] = temp;
}
}
}
return;
}
int main() {
int n;
cin >> n... | replace | 26 | 27 | 26 | 27 | TLE | |
p02773 | C++ | Time Limit Exceeded | #include <algorithm>
#include <deque>
#include <iostream>
#include <string>
#include <unordered_map>
int main(void) {
int n;
std::cin >> n;
std::unordered_map<std::string, int> mapCount;
std::string name;
int maxNumber = 0;
for (int count = 0; n > count; ++n) {
std::cin >> name;
int &c = mapCount[... | #include <algorithm>
#include <deque>
#include <iostream>
#include <string>
#include <unordered_map>
int main(void) {
int n;
std::cin >> n;
std::unordered_map<std::string, int> mapCount;
std::string name;
int maxNumber = 0;
for (int count = 0; n > count; ++count) {
std::cin >> name;
int &c = mapCo... | replace | 13 | 14 | 13 | 14 | TLE | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
map<string, int> mp;
const int maxn = 1e5 + 10;
string ans[maxn];
int let = 0, rigt = 0;
int main() {
int n, m = 0;
cin >> n;
string s;
for (int i = 0; i < n; i++) {
cin >> s;
if (!mp[s])
mp[s] = 1;
else
mp[s]++;
if (mp[s] > m) {
m ... | #include <bits/stdc++.h>
using namespace std;
map<string, int> mp;
const int maxn = 2e5 + 10;
string ans[maxn];
int let = 0, rigt = 0;
int main() {
int n, m = 0;
cin >> n;
string s;
for (int i = 0; i < n; i++) {
cin >> s;
if (!mp[s])
mp[s] = 1;
else
mp[s]++;
if (mp[s] > m) {
m ... | replace | 3 | 4 | 3 | 4 | 0 | |
p02773 | C++ | Runtime Error | #include <iostream>
#include <map>
using namespace std;
int main() {
int N;
cin >> N;
string S[N];
for (int i = 0; i < N; i++) {
cin >> S[i];
}
std::map<string, int> map;
for (int i = 0; i < N; i++) {
auto iter = map.find((S[i]));
if (iter != map.end()) {
iter->second = iter->second + ... | #include <iostream>
#include <map>
using namespace std;
int main() {
int N;
cin >> N;
string S[N];
for (int i = 0; i < N; i++) {
cin >> S[i];
}
std::map<string, int> map;
for (int i = 0; i < N; i++) {
auto iter = map.find((S[i]));
if (iter != map.end()) {
iter->second = iter->second + ... | replace | 33 | 34 | 33 | 34 | 1 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s.begin(), s.end());
int mx = 1, cnt = 1;
for (int i = 1; i < n; i++) {
if (s[i].compare(s[i - 1]) ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s.begin(), s.end());
int mx = 1, cnt = 1;
for (int i = 1; i < n; i++) {
if (s[i].compare(s[i - 1]) ... | replace | 24 | 25 | 24 | 25 | 0 | |
p02773 | C++ | Runtime Error | //
// じょえチャンネル
// 高評価・チャンネル登録よろしくお願いします!
// https://www.youtube.com/watch?v=gPFr7q7eLL8
//
/*------------------------------------
∧_∧
∧_∧ (´<_` )
( ´_ゝ`) / ⌒i
/ \ | |
/ / ̄ ̄ ̄ ̄/ |
__(__ニつ/ _/ .| .|____
\/____/ (u ⊃
-------------------------------------*/
#include <alg... | //
// じょえチャンネル
// 高評価・チャンネル登録よろしくお願いします!
// https://www.youtube.com/watch?v=gPFr7q7eLL8
//
/*------------------------------------
∧_∧
∧_∧ (´<_` )
( ´_ゝ`) / ⌒i
/ \ | |
/ / ̄ ̄ ̄ ̄/ |
__(__ニつ/ _/ .| .|____
\/____/ (u ⊃
-------------------------------------*/
#include <alg... | replace | 262 | 263 | 262 | 263 | 0 | |
p02773 | C++ | Runtime Error | //
#include <iostream>
#include <list>
#include <map>
using namespace std;
int main(int argc, const char *argv[]) {
int N = 0;
int count = 0;
int resultCount = 0;
int nameSaveCount = 0;
string nameSave[1000] = {};
list<string> list = {};
string s = "";
map<string, int> result;
// 入力
cin >> N;
... | //
#include <iostream>
#include <list>
#include <map>
using namespace std;
int main(int argc, const char *argv[]) {
int N = 0;
int count = 0;
int resultCount = 0;
int nameSaveCount = 0;
string nameSave[200000] = {};
list<string> list = {};
string s = "";
map<string, int> result;
// 入力
cin >> N;
... | replace | 13 | 14 | 13 | 14 | 0 | |
p02773 | C++ | Runtime Error | #include "algorithm"
#include "cmath"
#include "cstring"
#include "iostream"
#include "math.h"
#include "queue"
#include "set"
#include "stack"
#include "string"
#include "vector"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<vector<ll>> mat;
int main(... | #include "algorithm"
#include "cmath"
#include "cstring"
#include "iostream"
#include "math.h"
#include "queue"
#include "set"
#include "stack"
#include "string"
#include "vector"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<vector<ll>> mat;
int main(... | replace | 20 | 21 | 20 | 21 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define rep2(i, n) for (int i = 0; i <= n; i++)
#define repr(i, a, n) for (int i = a; i < n; i++)
#define all(a) a.begin(), a.end()
#define P pair<long long, ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define rep2(i, n) for (int i = 0; i <= n; i++)
#define repr(i, a, n) for (int i = a; i < n; i++)
#define all(a) a.begin(), a.end()
#define P pair<long long, ... | replace | 58 | 59 | 58 | 59 | -11 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); ++... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); ++... | replace | 30 | 31 | 30 | 31 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int N;
cin >> N;
map<string, int> m;
m["fa"] = 0;
string s;
rep(i, N) {
cin >> s;
m[s]++;
}
priority_queue<pair<int, string>> pq;
pair<int, string> q;
for (auto p : m) {
auto... | #include <bits/stdc++.h>
using namespace std;
int main() {
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int N;
cin >> N;
map<string, int> m;
m["fahigigiyfghgjhkjghfgdhgj"] = 0;
string s;
rep(i, N) {
cin >> s;
m[s]++;
}
priority_queue<pair<int, string>> pq;
pair<int, string> q;
for ... | replace | 9 | 10 | 9 | 10 | 0 | |
p02773 | C++ | Runtime Error | // #pragma GCC optimize("Ofast")
// #ifdef DEBUG
// #define _GLIBCXX_DEBUG
// #endif
// -Ofast
// -O3
// -O2
// -fsanitize=address
// -fsanitize=undefined
// add_compile_options()
#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <v... | // #pragma GCC optimize("Ofast")
// #ifdef DEBUG
// #define _GLIBCXX_DEBUG
// #endif
// -Ofast
// -O3
// -O2
// -fsanitize=address
// -fsanitize=undefined
// add_compile_options()
#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <v... | replace | 70 | 71 | 70 | 71 | 0 | |
p02773 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG // TLEの原因になるので注意!!!!!!!!!!!
#include <bits/stdc++.h>
#include <cmath>
typedef long long ll;
using namespace std;
vector<int> arr;
stack<int> st;
queue<int> qu;
queue<pair<int, int>> qu2;
priority_queue<int> pq;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = 1... | #define _GLIBCXX_DEBUG // TLEの原因になるので注意!!!!!!!!!!!
#include <bits/stdc++.h>
#include <cmath>
typedef long long ll;
using namespace std;
vector<int> arr;
stack<int> st;
queue<int> qu;
queue<pair<int, int>> qu2;
priority_queue<int> pq;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = 1... | replace | 67 | 70 | 67 | 72 | TLE | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define f(i, x, n) for (i = x; i < n; i++)
#define fr(i, x, n) for (i = x; i >= n; i--)
#define pu push_back
#define pp pop_back
#define F first
#define S second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define SP(x) fixed << setprecision(x)
#... | #include <bits/stdc++.h>
using namespace std;
#define f(i, x, n) for (i = x; i < n; i++)
#define fr(i, x, n) for (i = x; i >= n; i--)
#define pu push_back
#define pp pop_back
#define F first
#define S second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define SP(x) fixed << setprecision(x)
#... | replace | 45 | 46 | 45 | 46 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <string>
#include <utility>
#include <vector>
int main(int argc, char *argv[]) {
int n;
std::vector<std::string> s;
std::vector<std::pair<int, std::string>> scnt;
std::cin >> n;
s.resize(n);
for (int i = 0; i < n; i++) ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <string>
#include <utility>
#include <vector>
int main(int argc, char *argv[]) {
int n;
std::vector<std::string> s;
std::vector<std::pair<int, std::string>> scnt;
std::cin >> n;
s.resize(n);
for (int i = 0; i < n; i++) ... | replace | 40 | 41 | 40 | 41 | 0 | |
p02773 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int vector_finder(std::vector<string> vec, string number) {
auto itr = std::find(vec.begin(), vec.end(), number);
size_t index = std::distance(vec.begin(), itr);
if (index != vec.size()) { // 発見できたとき
... | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int vector_finder(std::vector<string> vec, string number) {
auto itr = std::find(vec.begin(), vec.end(), number);
size_t index = std::distance(vec.begin(), itr);
if (index != vec.size()) { // 発見できたとき
... | replace | 31 | 32 | 31 | 32 | TLE | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define sint(a) scanf("%d", &a)
#define sint2(a, b) scanf("%d %d", &a, &b)
#define sll(a) scanf("%lld", &a)
#define sll2(a, b) scanf("%lld %lld", &a, &b)
#define mem(a, i) memset(a, i, sizeof(a))
const double pi = acos(-1);
const int mod = 1e9 + 7;
c... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define sint(a) scanf("%d", &a)
#define sint2(a, b) scanf("%d %d", &a, &b)
#define sll(a) scanf("%lld", &a)
#define sll2(a, b) scanf("%lld %lld", &a, &b)
#define mem(a, i) memset(a, i, sizeof(a))
const double pi = acos(-1);
const int mod = 1e9 + 7;
c... | replace | 12 | 13 | 12 | 13 | 0 | |
p02773 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
std::cin >> n;
map<string, int> m;
int max = 0;
while (n--) {
string str;
cin >> str;
if (m.find(str) == m.end()) {
m[str] = 1;
max = max > m[str] ? max... | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
std::cin >> n;
map<string, int> m;
int max = 0;
while (n--) {
string str;
cin >> str;
if (m.find(str) == m.end()) {
m[str] = 1;
max = max > m[str] ? max... | replace | 33 | 42 | 33 | 35 | TLE | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
vector<int> count(0);
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s.begin(), s.end());
for (int i = 0; i < n; i++) {
if (i == 0) {
count[i] = 1;
} else if (s[i - 1] == s[i]) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
vector<int> count(n);
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s.begin(), s.end());
for (int i = 0; i < n; i++) {
if (i == 0) {
count[i] = 1;
} else if (s[i - 1] == s[i]) {
... | replace | 7 | 8 | 7 | 8 | -11 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina... | replace | 24 | 26 | 24 | 26 | 0 | |
p02773 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i < (int)(n); ++i)
#define repeq(i, n) for (int i = 0; i <= (int)(n); ++i)
#define rep1eq(i, n) for (int i = 1;... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i < (int)(n); ++i)
#define repeq(i, n) for (int i = 0; i <= (int)(n); ++i)
#define rep1eq(i, n) for (int i = 1;... | replace | 112 | 113 | 112 | 113 | -11 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, MAX;
string s[100007];
vector<string> v;
int main() {
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> s[i];
sort(s + 1, s + n + 1);
int cnt = 0;
for (int i = 1; i <= n; ++i) {
cnt++;
if (s[i] != s[i + 1]) {
MAX = max(MAX, cnt);
cnt ... | #include <bits/stdc++.h>
using namespace std;
int n, MAX;
string s[200007];
vector<string> v;
int main() {
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> s[i];
sort(s + 1, s + n + 1);
int cnt = 0;
for (int i = 1; i <= n; ++i) {
cnt++;
if (s[i] != s[i + 1]) {
MAX = max(MAX, cnt);
cnt ... | replace | 5 | 6 | 5 | 6 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, maxnum = 0, m = 0;
cin >> n;
string t;
vector<string> s(n), ans;
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s.begin(), s.end());
for (int i = 0; i < n;) {
t = s[i];
wh... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, maxnum = 0, m = 0;
cin >> n;
string t;
vector<string> s(n), ans;
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s.begin(), s.end());
for (int i = 0; i < n;) {
t = s[i];
wh... | replace | 16 | 17 | 16 | 17 | 0 | |
p02773 | Python | Time Limit Exceeded | import collections
N = int(input())
data = [input() for i in range(N)]
dicdata = collections.Counter(data)
newdata = [k for k, v in dicdata.items() if v == max(dicdata.values())]
newdata.sort()
[print(i) for i in newdata]
| import collections
N = int(input())
data = [input() for i in range(N)]
dicdata = collections.Counter(data)
m = max(dicdata.values())
newdata = [k for k, v in dicdata.items() if v == m]
newdata.sort()
[print(i) for i in newdata]
| replace | 7 | 8 | 7 | 10 | TLE | |
p02773 | Python | Time Limit Exceeded | N = int(input())
input_line = [input() for _ in range(N)]
count = {}
for w in input_line:
if w in count:
count[w] += 1
else:
count[w] = 1
keys = [k for k, v in count.items() if v == max(count.values())]
for w in sorted(keys):
print(w)
| N = int(input())
input_line = [input() for _ in range(N)]
count = {}
for w in input_line:
if w in count:
count[w] += 1
else:
count[w] = 1
max_values = max(count.values())
keys = [k for k, v in count.items() if v == max_values]
for w in sorted(keys):
print(w)
| replace | 8 | 10 | 8 | 10 | TLE | |
p02773 | Python | Time Limit Exceeded | n = int(input())
str_dic = {}
for _ in range(n):
inp = input()
if inp in str_dic:
str_dic[inp] += 1
else:
str_dic[inp] = 1
max_str = [s[0] for s in str_dic.items() if s[1] == max(str_dic.values())]
for s in sorted(max_str):
print(s)
| n = int(input())
str_dic = {}
for _ in range(n):
inp = input()
if inp in str_dic:
str_dic[inp] += 1
else:
str_dic[inp] = 1
max_num = max(str_dic.values())
max_str = [s[0] for s in str_dic.items() if s[1] == max_num]
for s in sorted(max_str):
print(s)
| replace | 9 | 10 | 9 | 12 | TLE | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
bool my_compare(pair<int, string> a, pair<int, string> b) {
// 基本はfirstで比較
if (a.first != b.first) {
// return a.first < b.first; // 昇順
return a.first > b.first; // 降順
}
// それ以外はsecondで比較
if (a.second != b.second) {
return a.second < b.second;
} el... | #include <bits/stdc++.h>
using namespace std;
bool my_compare(pair<int, string> a, pair<int, string> b) {
// 基本はfirstで比較
if (a.first != b.first) {
// return a.first < b.first; // 昇順
return a.first > b.first; // 降順
}
// それ以外はsecondで比較
if (a.second != b.second) {
return a.second < b.second;
} el... | replace | 44 | 45 | 44 | 45 | 0 | |
p02773 | Python | Time Limit Exceeded | n = int(input())
d = {}
for i in range(n):
s = input()
if s in d:
d[s] += 1
else:
d[s] = 1
max_d_list = [kv[0] for kv in d.items() if kv[1] == max(d.values())]
ans = sorted(max_d_list)
for i in ans:
print(i)
| n = int(input())
d = {}
for i in range(n):
s = input()
if s in d:
d[s] += 1
else:
d[s] = 1
max_d = max(d.values())
max_d_list = [kv[0] for kv in d.items() if kv[1] == max_d]
ans = sorted(max_d_list)
for i in ans:
print(i)
| replace | 9 | 10 | 9 | 11 | TLE | |
p02773 | Python | Runtime Error | import collections
n = int(input())
s_ = [input() for i in range(n)]
cnt = collections.Counter(s_)
cntList = list(cnt.most_common())
cnt_f = cnt.most_common()[0][1]
resList = []
for i in range(n):
if cntList[i][1] == cnt_f:
resList.append(cntList[i][0])
else:
break
resList.sort()
for i in re... | import collections
n = int(input())
s_ = [input() for i in range(n)]
cnt = collections.Counter(s_)
cntList = list(cnt.most_common())
cnt_f = cnt.most_common()[0][1]
resList = []
for i in range(len(cntList)):
if cntList[i][1] == cnt_f:
resList.append(cntList[i][0])
else:
break
resList.sort()
... | replace | 10 | 11 | 10 | 11 | 0 | |
p02773 | Python | Runtime Error | import sys
from collections import Counter
read = sys.stdin.read
N, *S = map(str, read().split())
s = Counter(S)
n = max(s.values())
answer = [i for i, j in s if j == n]
answer.sort()
print("\n".join(answer))
| import sys
from collections import Counter
read = sys.stdin.read
N, *S = map(str, read().split())
s = Counter(S)
n = max(s.values())
answer = [i for i, j in s.items() if j == n]
answer.sort()
print("\n".join(answer))
| replace | 8 | 9 | 8 | 9 | ValueError: too many values to unpack (expected 2) | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02773/Python/s963425667.py", line 9, in <module>
answer = [i for i, j in s if j == n]
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02773/Python/s963425667.py", line 9, in <listcomp>
... |
p02773 | Python | Time Limit Exceeded | from collections import Counter
n = int(input())
S = [input() for i in range(n)]
L = Counter(S)
K = sorted([kv[0] for kv in L.items() if kv[1] == max(L.values())])
for i in range(len(K)):
print(K[i])
| from collections import Counter
n = int(input())
S = [input() for i in range(n)]
L = Counter(S)
m = 0
for v in L.values():
m = max(m, v)
ans = []
for k, v in L.items():
if v == m:
ans.append(k)
ans.sort()
print(*ans, sep="\n")
| replace | 6 | 10 | 6 | 15 | TLE | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#define INF 0x3f3f3f3f;
using namespace std;
string s[200005];
bool cmp(string a, string b) { return a <= b; }
int main() {
int n, i;
scanf("%d", &n);
for (i = 0; i < n; i++)
cin >> s[i];
sor... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#define INF 0x3f3f3f3f;
using namespace std;
string s[200005];
bool cmp(string a, string b) { return a < b; }
int main() {
int n, i;
scanf("%d", &n);
for (i = 0; i < n; i++)
cin >> s[i];
sort... | replace | 12 | 13 | 12 | 13 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mit map<int, int>::iterator
#define sit set<int>::iterator
#define itrm(g, x) for (mit g = x.begin(); g != x.end(); g++)
#define itrs(g, x) for (sit g = x.begin(); g != x.end(); g++)
#define ltype int
#define rep(i, j, k) for (ltype(i) = (j); (... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mit map<int, int>::iterator
#define sit set<int>::iterator
#define itrm(g, x) for (mit g = x.begin(); g != x.end(); g++)
#define itrs(g, x) for (sit g = x.begin(); g != x.end(); g++)
#define ltype int
#define rep(i, j, k) for (ltype(i) = (j); (... | replace | 20 | 21 | 20 | 21 | 0 | |
p02773 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> a(n);
for (int i = 0; i < n; i++)
cin >> a.at(i);
sort(a.begin(), a.end());
vector<int> b(n);
for (int i = 0; i < n; i++) {
for (int j = i; j < n; j++) {
if (a.at(i) == a.at(j) && i != j) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> a(n);
for (int i = 0; i < n; i++)
cin >> a.at(i);
sort(a.begin(), a.end());
vector<int> b(n);
for (int i = n - 1; i > 0; i--) {
if (a.at(i) == a.at(i - 1)) {
b.at(i - 1)++;
b.at(i - 1) += b.a... | replace | 14 | 19 | 14 | 19 | TLE | |
p02773 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#endif
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
// while(cin>>n){
cin >> n;
map<string, int> mp;
int res(0);
string s;
for (int i... | #include "bits/stdc++.h"
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
// while(cin>>n){
cin >> n;
map<string, int> mp;
int res(0);
string s;
for (int i = 0; i < n; ++i)
cin >> s, mp[s]++, res = max(res, mp[s]);
for (auto x : mp)
if (x.... | replace | 5 | 9 | 5 | 6 | 0 | |
p02773 | Python | Time Limit Exceeded | N = int(input())
# 文字列の出現回数を格納
S = {}
for _ in range(N):
s = input()
if s in S:
S[s] += 1
else:
S[s] = 1
# 出現回数が最大の文字列をansに格納し、昇順にソートする
ans = [k for k, v in S.items() if v == max(S.values())]
ans.sort()
# 出力
for a in ans:
print(a)
| N = int(input())
# 文字列の出現回数を格納
S = {}
for _ in range(N):
s = input()
if s in S:
S[s] += 1
else:
S[s] = 1
# 出現回数が最大の文字列をansに格納し、昇順にソートする
# ans = [k for k, v in S.items() if v == max(S.values())]
# ans.sort()
max_value = max(S.values())
ans = sorted([k for k, v in S.items() if v == max_value... | replace | 12 | 14 | 12 | 16 | TLE | |
p02773 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#define all(v) (v).begin(), (v).end()
using namespace std;
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define int long long
#define lson rt << 1, l, mid
#define rson rt << 1 | 1, mid + 1, r
#define lll __int128
#define pii pair<int, int>
#define fi first
#define se second
#define mp make... | #include "bits/stdc++.h"
#define all(v) (v).begin(), (v).end()
using namespace std;
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define int long long
#define lson rt << 1, l, mid
#define rson rt << 1 | 1, mid + 1, r
#define lll __int128
#define pii pair<int, int>
#define fi first
#define se second
#define mp make... | insert | 47 | 47 | 47 | 48 | TLE | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
map<string, int> M;
for (int i = 0; i < N; i++) {
string s;
cin >> s;
if (!M.count(s))
M.at(s) = 1;
else
M.at(s) += 1;
}
int Max = 0;
for (auto p : M) {
auto k = p.first;
auto v = p.second;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
map<string, int> M;
for (int i = 0; i < N; i++) {
string s;
cin >> s;
if (!M.count(s))
M[s] = 1;
else
M.at(s) += 1;
}
int Max = 0;
for (auto p : M) {
auto k = p.first;
auto v = p.second;
if... | replace | 10 | 11 | 10 | 11 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): map::at
|
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
string s[100005], an[1000005];
map<string, int> mp;
int main() {
int n, ans = 0, cnt = 0;
cin >> n;
for (int i = 1; i <= n; ++i) {
cin >> s[i];
++mp[s[i]];
ans = max(ans, mp[s[i]]);
}
for (int i = 1; i <= n; ++i)
if (mp[s[i]] == ans) {
--m... | #include <bits/stdc++.h>
using namespace std;
string s[200005], an[1000005];
map<string, int> mp;
int main() {
int n, ans = 0, cnt = 0;
cin >> n;
for (int i = 1; i <= n; ++i) {
cin >> s[i];
++mp[s[i]];
ans = max(ans, mp[s[i]]);
}
for (int i = 1; i <= n; ++i)
if (mp[s[i]] == ans) {
--m... | replace | 4 | 5 | 4 | 5 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
#define f(i, n) for (int i = 0; i < (n); i++)
#define inf (int)(3e18)
#define int long long
#define mod (int)(1000000007)
#define intt long long
using namespace std;
// Library
// モッドパウ
int modpow(int x, int y, int m = mod) {
int res = 1;
while (y) {
if (y % 2) {
res *= x;
... | #include <bits/stdc++.h>
#define f(i, n) for (int i = 0; i < (n); i++)
#define inf (int)(3e18)
#define int long long
#define mod (int)(1000000007)
#define intt long long
using namespace std;
// Library
// モッドパウ
int modpow(int x, int y, int m = mod) {
int res = 1;
while (y) {
if (y % 2) {
res *= x;
... | replace | 290 | 291 | 290 | 291 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
int main(void) {
int N;
int max = 0;
string s[100000];
map<string, int> m;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> s[i];
m[s[i]]++;... | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
int main(void) {
int N;
int max = 0;
string s[200002];
map<string, int> m;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> s[i];
m[s[i]]++;... | replace | 11 | 12 | 11 | 12 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
int n;
string s[100001], ans[100001];
int cnt;
int main() {
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> s[i];
sort(s + 1, s + 1 + n);
int cur = 1, maxx = 0;
for (int i = 2; i <= n; ++i) {... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
int n;
string s[200001], ans[200001];
int cnt;
int main() {
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> s[i];
sort(s + 1, s + 1 + n);
int cur = 1, maxx = 0;
for (int i = 2; i <= n; ++i) {... | replace | 7 | 8 | 7 | 8 | 0 | |
p02773 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, maxj = 1;
cin >> n;
string s;
map<string, int> mapj;
for (int i = 0; i < n; i++) {
cin >> s;
if (mapj.count(s)) {
mapj.at(s)++;
maxj = max(maxj, mapj.at(s));
} else {
mapj.insert(make_pair(s, 1));
}
}
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, maxj = 1;
cin >> n;
string s;
map<string, int> mapj;
for (int i = 0; i < n; i++) {
cin >> s;
if (mapj.count(s)) {
mapj.at(s)++;
maxj = max(maxj, mapj.at(s));
} else {
mapj.insert(make_pair(s, 1));
}
}
... | replace | 18 | 21 | 18 | 21 | TLE | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
string s[100005];
map<string, int> mp;
vector<string> v;
int main() {
ios::sync_with_stdio(false);
int n, ans = 0;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> s[i];
mp[s[i]]++;
ans = max(ans, mp[s[i]]);
}
for (int i = 1; i <= n; i++) {
if (... | #include <bits/stdc++.h>
using namespace std;
string s[200005];
map<string, int> mp;
vector<string> v;
int main() {
ios::sync_with_stdio(false);
int n, ans = 0;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> s[i];
mp[s[i]]++;
ans = max(ans, mp[s[i]]);
}
for (int i = 1; i <= n; i++) {
if (... | replace | 3 | 4 | 3 | 4 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
cin >> N;
vector<string> S;
for (int i = 0; i < N; ++i) {
string s;
cin >> s;
S.push_back(s);
}
sort(S.begin(), S.end());
int count = 1;
int count_max = 1;
deque<string> ans;
ans.push_back(S[0]);
for (int i = 1; i ... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
cin >> N;
vector<string> S;
for (int i = 0; i < N; ++i) {
string s;
cin >> s;
S.push_back(s);
}
sort(S.begin(), S.end());
int count = 1;
int count_max = 1;
deque<string> ans;
ans.push_back(S[0]);
for (int i = 1; i ... | replace | 19 | 20 | 19 | 20 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define sqr(x) ((x) * (x))
#define cube(x) ((x) * (x) * (x))
#define GCD(a, b) __gcd(a, b)
#define LCM(a, b) ((a) * (b) / GCD(a, b))
#define PI (3.141592653589793238462643383279502884197169399375105820974944)
#define MP make_pair
#define n1 first
#define n2 second
#define ... | #include <bits/stdc++.h>
using namespace std;
#define sqr(x) ((x) * (x))
#define cube(x) ((x) * (x) * (x))
#define GCD(a, b) __gcd(a, b)
#define LCM(a, b) ((a) * (b) / GCD(a, b))
#define PI (3.141592653589793238462643383279502884197169399375105820974944)
#define MP make_pair
#define n1 first
#define n2 second
#define ... | replace | 35 | 36 | 35 | 36 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = 0; i < (n); ++i)
#def... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = 0; i < (n); ++i)
#def... | replace | 53 | 54 | 53 | 54 | 0 | |
p02773 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define Rep(i, n) for (int i = 0; i < (int)(n); i++)
#define For(i, n1, n2) for (int i = (int)(n1); i < (int)(n2); i++)
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define RREP(i, n) for (ll i = ((ll)(n)-1); i >= 0; i--)
#define FOR(i, n1, n2) for (ll i = (ll)(n1); i... | #include "bits/stdc++.h"
using namespace std;
#define Rep(i, n) for (int i = 0; i < (int)(n); i++)
#define For(i, n1, n2) for (int i = (int)(n1); i < (int)(n2); i++)
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define RREP(i, n) for (ll i = ((ll)(n)-1); i >= 0; i--)
#define FOR(i, n1, n2) for (ll i = (ll)(n1); i... | replace | 95 | 96 | 95 | 96 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repto(i, n) for (int i = 0; i <= (n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define _1 first
#define _2 second
#... | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repto(i, n) for (int i = 0; i <= (n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define _1 first
#define _2 second
#... | replace | 40 | 41 | 40 | 41 | 0 | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
#define dbg cout << "Freak" << endl;
#define dbgg(i) cout << i << endl;
#define N 1e9 + 7
#define pb push_back
#define pi acos(-1)
using namespace std;
ll arr[100005];
ll t;
vector<string> v, v1;
map<string, ll> mp;
map<string, string> np;
int main() {
ll a, b, c, d, e, ... | #include <bits/stdc++.h>
typedef long long ll;
#define dbg cout << "Freak" << endl;
#define dbgg(i) cout << i << endl;
#define N 1e9 + 7
#define pb push_back
#define pi acos(-1)
using namespace std;
ll arr[100005];
ll t;
vector<string> v, v1;
map<string, ll> mp;
map<string, string> np;
int main() {
ll a, b, c, d, e, ... | replace | 33 | 34 | 33 | 34 | -11 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | replace | 75 | 76 | 75 | 76 | 0 | |
p02773 | Python | Time Limit Exceeded | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from collections import Counter
def main():
N = int(input())
S = [input() for _ in range(N)]
S = Counter(S)
result = []
for key, value in S.items():
if value == S.most_common()[0][1]:
result.append(key)
result.sort()
for r... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from collections import Counter
def main():
N = int(input())
S = [input() for _ in range(N)]
S = Counter(S)
SM = S.most_common()[0][1]
S = sorted(S.items(), key=lambda x: [-x[1], x[0]])
for key, value in S:
if value == SM:
pri... | replace | 10 | 17 | 10 | 17 | TLE | |
p02773 | Python | Runtime Error | def main():
n = int(input())
words = {}
for _ in range(n):
a = input()
if a in words:
words[a] += 1
else:
words[a] = 1
max_val = max(words.values())
# words_sorted = sorted(words.items(), key=lambda x: x[0])
for key, value in sorted(words):
... | def main():
n = int(input())
words = {}
for _ in range(n):
a = input()
if a in words:
words[a] += 1
else:
words[a] = 1
max_val = max(words.values())
# words_sorted = sorted(words.items(), key=lambda x: x[0])
for key, value in sorted(words.items())... | replace | 12 | 13 | 12 | 13 | ValueError: too many values to unpack (expected 2) | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02773/Python/s861205933.py", line 23, in <module>
main()
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02773/Python/s861205933.py", line 13, in main
for key, value in sorted(words):... |
p02773 | Python | Time Limit Exceeded | import collections
import sys
input = sys.stdin.readline
q = int(input())
a = [input().rstrip() for _ in range(q)]
dic = collections.Counter(a)
keys = [k for k, v in dic.items() if v == max(dic.values())]
keys_s = sorted(keys)
for i in keys_s:
print(i)
| import collections
import sys
input = sys.stdin.readline
q = int(input())
a = [input().rstrip() for _ in range(q)]
dic = collections.Counter(a)
ma = max(dic.values())
keys = [k for k, v in dic.items() if v == ma]
keys_s = sorted(keys)
for i in keys_s:
print(i)
| replace | 10 | 11 | 10 | 12 | TLE | |
p02773 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
long int n;
scanf("%ld", &n);
string s[n];
long int i, max = 0, cnt = 0;
for (i = 0; i < n; ++i)
cin >> s[i];
sort(s, s + n);
for (i = 0; i < n - 1; ++i) {
if (s[i] == s[i + 1])
cnt++;
else {
if (... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
long int n;
scanf("%ld", &n);
string s[n];
long int i, max = 0, cnt = 0;
for (i = 0; i < n; ++i)
cin >> s[i];
sort(s, s + n);
for (i = 0; i < n - 1; ++i) {
if (s[i] == s[i + 1])
cnt++;
else {
if (... | replace | 33 | 34 | 33 | 34 | 0 | |
p02773 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <string>
#define mem(i, a) memset(i, a, sizeof(i))
#define PI acos(-1.0)
#define DMAX 100000 + 5
#define MOD 20190823
#define eps 1e-8
#define mp make_pair
#define INF 1000000000 + 9
using namespace std;
typedef long l... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <string>
#define mem(i, a) memset(i, a, sizeof(i))
#define PI acos(-1.0)
#define DMAX 200000 + 5
#define MOD 20190823
#define eps 1e-8
#define mp make_pair
#define INF 1000000000 + 9
using namespace std;
typedef long l... | replace | 8 | 9 | 8 | 9 | 0 | |
p02774 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N;
ll K;
cin >> N >> K;
ll A;
vector<ll> B;
vector<ll> C;
ll z = 0;
for (int i = 0; i < N; i++) {
cin >> A;
if (A == 0)
z++;
else if (A < 0)
B.push_back(A);
else
C.push_back(A);
}
l... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N;
ll K;
cin >> N >> K;
ll A;
vector<ll> B;
vector<ll> C;
ll z = 0;
for (int i = 0; i < N; i++) {
cin >> A;
if (A == 0)
z++;
else if (A < 0)
B.push_back(A);
else
C.push_back(A);
}
l... | replace | 32 | 36 | 32 | 39 | TLE | |
p02774 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<long long> a;
long long check(long long x) {
long long ret = 0, n = a.size();
for (int i = 0; i < n; ++i) {
if (a[i] == 0) {
ret += n - 1;
} else if (a[i] < 0) {
int l = 0, r = n - 1;
while (l <= r) {
int mid = (l + r) / 2;
... | #include <bits/stdc++.h>
using namespace std;
vector<long long> a;
long long check(long long x) {
long long ret = 0, n = a.size();
for (int i = 0; i < n; ++i) {
if (a[i] == 0) {
if (0 <= x)
ret += n - 1;
} else if (a[i] < 0) {
int l = 0, r = n - 1;
while (l <= r) {
int mi... | replace | 8 | 9 | 8 | 10 | 0 | |
p02774 | C++ | Runtime Error | // Etavioxy
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#define il inline
#define ll long long
#define rep(i, s, t) for (register int i = (s); i <= (t); i++)
#define rev_rep(i, s, t) for (register int i = (s); i >= (t); i--)
#define each(i, u) for (int i = head[u]; i; i ... | // Etavioxy
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#define il inline
#define ll long long
#define rep(i, s, t) for (register int i = (s); i <= (t); i++)
#define rev_rep(i, s, t) for (register int i = (s); i >= (t); i--)
#define each(i, u) for (int i = head[u]; i; i ... | replace | 25 | 26 | 25 | 26 | 0 | |
p02774 | C++ | Runtime Error | #include <bits/stdc++.h>
#define N 100005
typedef long long ll;
using namespace std;
int a[N], b[N];
vector<int> v1, v2;
ll k;
bool check1(ll mid) {
ll num = 0;
for (int i = 0; i < v1.size(); i++) {
ll x = mid / v1[i];
if (mid % v1[i])
x++;
int p = lower_bound(v1.begin(), v1.end(), x) - v1.begi... | #include <bits/stdc++.h>
#define N 200005
typedef long long ll;
using namespace std;
int a[N], b[N];
vector<int> v1, v2;
ll k;
bool check1(ll mid) {
ll num = 0;
for (int i = 0; i < v1.size(); i++) {
ll x = mid / v1[i];
if (mid % v1[i])
x++;
int p = lower_bound(v1.begin(), v1.end(), x) - v1.begi... | replace | 1 | 2 | 1 | 2 | 0 | |
p02774 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
// [a -> b-1]
#define reps(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
// [0 -> a-1]
#define rep(i, a) reps(i, 0, (a))
// [a-1 -> b]
#define rreps(i, a, b) for (int i = (int)((a)-1); i >= (int)(b); i--)
// [a-1 -> 0]
#define rre... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
// [a -> b-1]
#define reps(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
// [0 -> a-1]
#define rep(i, a) reps(i, 0, (a))
// [a-1 -> b]
#define rreps(i, a, b) for (int i = (int)((a)-1); i >= (int)(b); i--)
// [a-1 -> 0]
#define rre... | replace | 161 | 162 | 161 | 162 | TLE | |
p02774 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#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, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define INF (ll)2e9
#define MOD ((ll)1e9 + 7)
#define ALL(... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#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, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define INF (ll)2e9
#define MOD ((ll)1e9 + 7)
#define ALL(... | replace | 240 | 241 | 240 | 241 | TLE | |
p02774 | Python | Runtime Error | import numpy as np
from bisect import bisect
DEBUG = False
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
A.sort()
A = np.array(A, dtype=np.int64)
neg = A[A < 0]
zero = A[A == 0]
pos = A[A > 0]
# Only keep the abs value of the negatives and flip so it's sorted
revAbsNeg = np.flip(-neg)... | import numpy as np
from bisect import bisect
DEBUG = False
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
A.sort()
A = np.array(A, dtype=np.int64)
neg = A[A < 0]
zero = A[A == 0]
pos = A[A > 0]
# Only keep the abs value of the negatives and flip so it's sorted
revAbsNeg = -neg[::-1]
... | replace | 17 | 18 | 17 | 18 | TLE | |
p02774 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define RREP(i, m, n) for (int i = (int)(n - 1); i >= m; i--)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) RREP(i, 0, n)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define au... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define RREP(i, m, n) for (int i = (int)(n - 1); i >= m; i--)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) RREP(i, 0, n)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define au... | replace | 82 | 83 | 82 | 83 | 0 | |
p02774 | Python | Runtime Error | # https://maspypy.com/atcoder-%E5%8F%82%E5%8A%A0%E6%84%9F%E6%83%B3-2019-02-16abc-155#toc3
# https://atcoder.jp/contests/abc155/submissions/10152895
# 写経
# 条件を満たす要素を抽出
# ndarray[条件式]
def binary_search(*, ok, ng, func):
while abs(ok - ng) > 1:
mid = (ok + ng) // 2
if func(mid):
ok = mi... | # https://maspypy.com/atcoder-%E5%8F%82%E5%8A%A0%E6%84%9F%E6%83%B3-2019-02-16abc-155#toc3
# https://atcoder.jp/contests/abc155/submissions/10152895
# 写経
# 条件を満たす要素を抽出
# ndarray[条件式]
def binary_search(*, ok, ng, func):
while abs(ok - ng) > 1:
mid = (ok + ng) // 2
if func(mid):
ok = mi... | replace | 57 | 58 | 57 | 59 | TLE | |
p02774 | C++ | Runtime Error | // AtCoder.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
// AtCoder.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#define _USE_MATH_DEFINES
#include <math.h>
// #include<cmath>
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <c... | // AtCoder.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
// AtCoder.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#define _USE_MATH_DEFINES
#include <math.h>
// #include<cmath>
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <c... | replace | 81 | 82 | 81 | 82 | 0 | |
p02774 | C++ | Runtime Error | #pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include... | #pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include... | replace | 90 | 91 | 90 | 91 | 0 | |
p02774 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define WHOLE(v) (v).begin(), (v).end()
#define REV_WHOLE(v) (v).rbegin(), (v).rend()
using i64 = int64_t;
using namespace std;
template <class F> auto recursive(F f) {
return [f](auto... a) { return f(f, a...); };
}
template <class I, class V = typename I::value_type>
V sum_up(const I &l, co... | #include <bits/stdc++.h>
#define WHOLE(v) (v).begin(), (v).end()
#define REV_WHOLE(v) (v).rbegin(), (v).rend()
using i64 = int64_t;
using namespace std;
template <class F> auto recursive(F f) {
return [f](auto... a) { return f(f, a...); };
}
template <class I, class V = typename I::value_type>
V sum_up(const I &l, co... | replace | 77 | 80 | 77 | 99 | TLE | |
p02774 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define rep(i, m, n) for (ll i = (m); i <= (n); i++)
#define zep(i, m, n) for (ll i = (m); i < (n); i++)
#define rrep(i, m, n) for (ll i = (m); i >= (n); i--)
#define print(x) cout <<... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define rep(i, m, n) for (ll i = (m); i <= (n); i++)
#define zep(i, m, n) for (ll i = (m); i < (n); i++)
#define rrep(i, m, n) for (ll i = (m); i >= (n); i--)
#define print(x) cout <<... | replace | 16 | 17 | 16 | 17 | 0 | |
p02774 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <tuple>
#include <vector>
constexpr long long int inf = 1e18 + 334 + 810 + 1919;
namespace MyInputAndOutput {
// 入力関係 (cin)
class user_input {
public:
inline const user_input &operator>>(int &int_arg) const {
scanf("%d", &int_arg);
return *this;
}
inline c... | #include <algorithm>
#include <cstdio>
#include <tuple>
#include <vector>
constexpr long long int inf = 1e18 + 334 + 810 + 1919;
namespace MyInputAndOutput {
// 入力関係 (cin)
class user_input {
public:
inline const user_input &operator>>(int &int_arg) const {
scanf("%d", &int_arg);
return *this;
}
inline c... | replace | 329 | 330 | 329 | 330 | 0 | |
p02774 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 10;
ll n, k, a[N];
vector<ll> v1, v2, v0;
bool check(ll val) {
ll cnt = 0;
for (int i = 1; i <= n; i++) {
if (a[i] == 0) {
if (val >= 0)
cnt += n - 1;
} else if (a[i] > 0) {
if (val >= 0) {
ll... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e5 + 10;
ll n, k, a[N];
vector<ll> v1, v2, v0;
bool check(ll val) {
ll cnt = 0;
for (int i = 1; i <= n; i++) {
if (a[i] == 0) {
if (val >= 0)
cnt += n - 1;
} else if (a[i] > 0) {
if (val >= 0) {
ll... | replace | 3 | 4 | 3 | 4 | 0 | |
p02774 | Python | Runtime Error | from bisect import bisect_left, bisect_right
n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
n_m = bisect_left(a, 0) # a[i] < 0 の数
n_0 = bisect_right(a, 0) - n_m # a[i] = 0 の数
n_p = n - n_m - n_0 # a[i] > 0 の数
nn_m = n_m * n_p # 積が負になるペア数
nn_0 = n_0 * (n - n_0) + n_0 * (n_0 - 1) // ... | from bisect import bisect_left, bisect_right
n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
n_m = bisect_left(a, 0) # a[i] < 0 の数
n_0 = bisect_right(a, 0) - n_m # a[i] = 0 の数
n_p = n - n_m - n_0 # a[i] > 0 の数
nn_m = n_m * n_p # 積が負になるペア数
nn_0 = n_0 * (n - n_0) + n_0 * (n_0 - 1) // ... | replace | 45 | 46 | 45 | 46 | IndexError: list index out of range | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02774/Python/s789969852.py", line 58, in <module>
if check_minus(mid):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02774/Python/s789969852.py", line 45, in check_minus
while a[i] ... |
p02774 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
ty... | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
ty... | replace | 78 | 89 | 78 | 95 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.