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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03038 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long LL;
template <typename F, typename S>
std::ostream &operator<<(ostream &os, const ... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long LL;
template <typename F, typename S>
std::ostream &operator<<(ostream &os, const ... | replace | 61 | 62 | 61 | 66 | 0 | |
p03038 | Python | Time Limit Exceeded | import sys
from collections import defaultdict
from collections import deque
input = sys.stdin.readline
new_cards = defaultdict(int)
n, m = map(int, input().split())
A = deque(sorted(list(map(int, input().split()))))
for i in range(m):
b, c = map(int, input().split())
new_cards[c] += b
for card, count in so... | import sys
from collections import defaultdict
from collections import deque
input = sys.stdin.readline
new_cards = defaultdict(int)
n, m = map(int, input().split())
A = deque(sorted(list(map(int, input().split()))))
for i in range(m):
b, c = map(int, input().split())
new_cards[c] += b
for card, count in so... | insert | 19 | 19 | 19 | 22 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
using ll = long long;
int main() {
ll n, m;
cin >> n >> m;
vector<pair<ll, ll>> w(m + 100100);
for (ll i = m; i < m + 100100; i++) {
w[i].second = 0;
}
for (ll i = 0; i < n; i++) {
ll a;
cin >> a;
w[m + a].first = a;
w[m ... | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
using ll = long long;
int main() {
ll n, m;
cin >> n >> m;
vector<pair<ll, ll>> w(m + 100100);
for (ll i = m; i < m + 100100; i++) {
w[i].second = 0;
}
for (ll i = 0; i < n; i++) {
ll a;
cin >> a;
w[m + i].first = a;
w[m ... | replace | 17 | 19 | 17 | 19 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define FAST \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define MAXX 100005
#define PI 3.1415... | #include <bits/stdc++.h>
#define FAST \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define MAXX 100005
#define PI 3.1415... | delete | 26 | 27 | 26 | 26 | TLE | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include <vector>
int ctoi(char c) {
switch (c) {
case '0':
return 0;
case '1':
return 1;
case '2':
return 2;
case '3':
return 3;
case '4':
return 4;
case '5':
return 5;
case '6':
ret... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include <vector>
int ctoi(char c) {
switch (c) {
case '0':
return 0;
case '1':
return 1;
case '2':
return 2;
case '3':
return 3;
case '4':
return 4;
case '5':
return 5;
case '6':
ret... | replace | 48 | 49 | 48 | 49 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <cstring>
#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 <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <cstring>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
... | insert | 86 | 86 | 86 | 90 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define pp pop_back
#define mp make_pair
#define ff first
#define ss second
#define maxn 1000000007
#define PI 3.14159265358979323846
#define MAX 1000007
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define pp pop_back
#define mp make_pair
#define ff first
#define ss second
#define maxn 1000000007
#define PI 3.14159265358979323846
#define MAX 1000007
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin... | replace | 37 | 38 | 37 | 38 | TLE | |
p03038 | 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 MOD 1000000007
#define INF 1000000000000000
#define fi first
#define se second
#define all(v) v.begin(), v.end()
#define pb push_back
int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
struct edge {
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define MOD 1000000007
#define INF 1000000000000000
#define fi first
#define se second
#define all(v) v.begin(), v.end()
#define pb push_back
int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
struct edge {
... | insert | 68 | 68 | 68 | 70 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
rep(i, n) cin >> a.at(i);
vector<P> cb(m);
rep(i, m) {
int b, c;
cin >> b >> c;
cb.at(i) = mak... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
rep(i, n) cin >> a.at(i);
vector<P> cb(m);
rep(i, m) {
int b, c;
cin >> b >> c;
cb.at(i) = mak... | insert | 29 | 29 | 29 | 31 | TLE | |
p03038 | C++ | Runtime Error | /**
* Dont raise your voice, improve your argument.
* --Desmond Tutu
*/
#include <bits/stdc++.h>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
#define fori(n) for (ll i = 0; i < (n); i++)
#define forn(i, n) for (ll i = 0; i < (n); i++)
#define forn3(i, x, n) for (ll i = (x); i < (n); i++)
... | /**
* Dont raise your voice, improve your argument.
* --Desmond Tutu
*/
#include <bits/stdc++.h>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
#define fori(n) for (ll i = 0; i < (n); i++)
#define forn(i, n) for (ll i = 0; i < (n); i++)
#define forn3(i, x, n) for (ll i = (x); i < (n); i++)
... | replace | 40 | 41 | 40 | 41 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
using namespace std;
#define reps(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) reps(i, 0, n)
#define fi first
#define se second
t... | #include <bits/stdc++.h>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
using namespace std;
#define reps(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) reps(i, 0, n)
#define fi first
#define se second
t... | replace | 35 | 36 | 35 | 40 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct c {
int a;
int b;
bool operator<(const c &right) const { return b > right.b; }
};
int main() {
long long int n, m, i, j, ima = 0, wa = 0;
cin >> n >> m;
int a[n];
for (i = 0... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct c {
int a;
int b;
bool operator<(const c &right) const { return b > right.b; }
};
int main() {
long long int n, m, i, j, ima = 0, wa = 0;
cin >> n >> m;
int a[n];
for (i = 0... | replace | 37 | 40 | 37 | 40 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll N, M;
cin >> N >> M;
vector<ll> A(N);
vector<pair<ll, ll>> B(M);
REP(i, N) cin >> A.at(i);
REP(i, M) {
int x, y;
cin ... | #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll N, M;
cin >> N >> M;
vector<ll> A(N);
vector<pair<ll, ll>> B(M);
REP(i, N) cin >> A.at(i);
REP(i, M) {
int x, y;
cin ... | insert | 30 | 30 | 30 | 32 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
long b, c, temp = 9999999999, ans = 0;
vector<pair<long, long>> p;
cin >> n >> m;
vector<long> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
temp = min(temp, a[i]);
}
for (int i = 0; i < m; i++) {
cin >> b >> c;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
long b, c, temp = 9999999999, ans = 0;
vector<pair<long, long>> p;
cin >> n >> m;
vector<long> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
temp = min(temp, a[i]);
}
for (int i = 0; i < m; i++) {
cin >> b >> c;
... | replace | 28 | 29 | 28 | 29 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define fu(i, r, t) for (int i = r; i... | #include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define fu(i, r, t) for (int i = r; i... | replace | 39 | 40 | 39 | 40 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using Int = long long int;
template <typename T> void swap(T *t1, T *t2) {
T *tmp = t1;
t1 = t2;
t2 = tmp;
}
Int tmpi = 0;
double tmpd = 0.0;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
Int n, m;
vector<Int> a;
multimap<Int, Int, greater<Int>> bc... | #include <bits/stdc++.h>
using namespace std;
using Int = long long int;
template <typename T> void swap(T *t1, T *t2) {
T *tmp = t1;
t1 = t2;
t2 = tmp;
}
Int tmpi = 0;
double tmpd = 0.0;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
Int n, m;
vector<Int> a;
multimap<Int, Int, greater<Int>> bc... | replace | 37 | 39 | 37 | 39 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll n, m;
cin >> n >> m;
vector<ll> v(n);
vector<pair<ll, ll>> nikola;
for (ll i = 0; i < n; ++i) {
cin >> v[i];
}
sort(v.begin(), v.end());
for (ll i = 0; i < m; ++i) {
ll b, c;
cin >> b >> c;
nikola.push... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll n, m;
cin >> n >> m;
vector<ll> v(n);
vector<pair<ll, ll>> nikola;
for (ll i = 0; i < n; ++i) {
cin >> v[i];
}
sort(v.begin(), v.end());
for (ll i = 0; i < m; ++i) {
ll b, c;
cin >> b >> c;
nikola.push... | replace | 27 | 28 | 27 | 28 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a.begin(), a.end());
vector<pair<int, int>> x(m);
for (int i = 0; i < m; i++) {
cin >> x[i].first >> x[i].second;
}
so... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a.begin(), a.end());
vector<pair<int, int>> x(m);
for (int i = 0; i < m; i++) {
cin >> x[i].first >> x[i].second;
}
so... | replace | 34 | 35 | 34 | 35 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <exception>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <vector>
using... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <exception>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <vector>
using... | replace | 62 | 63 | 62 | 63 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef set<int> si;
typedef pair<int, int> pii;
#define rep(i, a, b) for (int i = (a); i < (b); ++i)
#define per(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define all(x) (x).begin(), (x).end()
#define s... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef set<int> si;
typedef pair<int, int> pii;
#define rep(i, a, b) for (int i = (a); i < (b); ++i)
#define per(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define all(x) (x).begin(), (x).end()
#define s... | replace | 52 | 53 | 52 | 53 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <chrono>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <random>
using namespace std;
using namespace __gnu_pbds;
#define endl '\n'
typedef long long ll;
typedef pair<ll, ll> pii;
// typedef tree<int,null_type,less<int>,rb_tree_tag,
// tree_or... | #include <bits/stdc++.h>
#include <chrono>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <random>
using namespace std;
using namespace __gnu_pbds;
#define endl '\n'
typedef long long ll;
typedef pair<ll, ll> pii;
// typedef tree<int,null_type,less<int>,rb_tree_tag,
// tree_or... | replace | 59 | 60 | 59 | 61 | TLE | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
// マクロ
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
#def... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
// マクロ
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
#def... | replace | 48 | 49 | 48 | 50 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
// typedef
//------------------------------------------
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<PII> VP;
// REPEAT
//------------------------------... | #include <bits/stdc++.h>
#define int long long
using namespace std;
// typedef
//------------------------------------------
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<PII> VP;
// REPEAT
//------------------------------... | replace | 66 | 67 | 66 | 67 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(N);
vector<pair<int, int>> BC(M);
for (int i = 0; i < N; ++i) {
cin >> A[i];
}
for (int i = 0; i < M; ++i) {
cin >> BC[i].first >> BC[i].second;
}
sort(BC.begin(), BC.end(),
[](auto l, au... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(N);
vector<pair<int, int>> BC(M);
for (int i = 0; i < N; ++i) {
cin >> A[i];
}
for (int i = 0; i < M; ++i) {
cin >> BC[i].first >> BC[i].second;
}
sort(BC.begin(), BC.end(),
[](auto l, au... | replace | 26 | 27 | 26 | 28 | TLE | |
p03038 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <cmath>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int64_t N, M;
cin >> N >> M;
vector<int64_t> A(N);
for (int64_t i = 0; i < N; i++) {
... | #include <algorithm>
#include <array>
#include <cmath>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int64_t N, M;
cin >> N >> M;
vector<int64_t> A(N);
for (int64_t i = 0; i < N; i++) {
... | insert | 46 | 46 | 46 | 48 | TLE | |
p03038 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
#include <type_traits>
#... | #include <algorithm>
#include <bitset>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
#include <type_traits>
#... | insert | 58 | 58 | 58 | 60 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<ll, ll> P;
ll Mod = 1000000007;
int main() {
ll N, M;
cin >> N >> M;
vector<ll> A(N);
vector<P> Card(M);
for (int i = 0; i < N; i++) {
cin >> A[i];
}
ll sum = 0;
for (int i = 0; i < M; i++) {
cin >> Card[i].second >... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<ll, ll> P;
ll Mod = 1000000007;
int main() {
ll N, M;
cin >> N >> M;
vector<ll> A(N);
vector<P> Card(M);
for (int i = 0; i < N; i++) {
cin >> A[i];
}
ll sum = 0;
for (int i = 0; i < M; i++) {
cin >> Card[i].second >... | replace | 27 | 28 | 27 | 28 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vvi vector<vector<int>>
#define vi vector<int>
#define All(X) X.begin(), X.end()
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define pb push_back
#define pii pair<int, int>... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vvi vector<vector<int>>
#define vi vector<int>
#define All(X) X.begin(), X.end()
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define pb push_back
#define pii pair<int, int>... | insert | 19 | 19 | 19 | 21 | TLE | |
p03038 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
const int maxn = 100001;
int n, m;
int a[maxn];
struct bbb {
int t;
int num;
};
bbb b[maxn];
bool cmp(bbb x, bbb y) { return x.num > y.num; }
int main() {
long long ans = 0;
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
const int maxn = 100001;
int n, m;
int a[maxn];
struct bbb {
int t;
int num;
};
bbb b[maxn];
bool cmp(bbb x, bbb y) { return x.num > y.num; }
int main() {
long long ans = 0;
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin ... | replace | 37 | 38 | 37 | 39 | TLE | |
p03038 | C++ | Runtime Error | // #pragma GCC optimize("Ofast")
// #pragma GCC
// target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define FAST ... | // #pragma GCC optimize("Ofast")
// #pragma GCC
// target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define FAST ... | replace | 130 | 131 | 130 | 131 | 0 |
Time Elasped : 0.033494
|
p03038 | C++ | Runtime Error | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define INF 2000000007
#define MOD 998244353
#define MAX 100005
typedef unsi... | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define INF 2000000007
#define MOD 998244353
#define MAX 100005
typedef unsi... | insert | 54 | 54 | 54 | 56 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
static const uint64_t MOD = 1000000007LL;
// uint64_t dp[100005][13];
int main() {
int n, m;
cin >> n >> m;
map<long, long> mcb;
priority_queue<long, vector<long>, greater<long>> q... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
static const uint64_t MOD = 1000000007LL;
// uint64_t dp[100005][13];
int main() {
int n, m;
cin >> n >> m;
map<long, long, greater<long>> mcb;
priority_queue<long, vector<long>, g... | replace | 14 | 15 | 14 | 15 | TLE | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
typedef pair<long, long> P;
int main() {
long n, m;
long ans = 0;
cin >> n >> m;
vector<long> a(n);
priority_queue<P> pq;
for (long i = 0; i < n; i++)
ci... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
typedef pair<long, long> P;
int main() {
long n, m;
long ans = 0;
cin >> n >> m;
vector<long> a(n);
priority_queue<P> pq;
for (long i = 0; i < n; i++)
ci... | replace | 29 | 31 | 29 | 35 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, m;
cin >> n >> m;
ll ans = 0;
vector<pair<ll, ll>> ar(n);
ll a[n];
for (int i = 0; i < n; i++)
cin >> a[i], ans += a[i];
sort(a, a + n);
for ... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, m;
cin >> n >> m;
ll ans = 0;
vector<pair<ll, ll>> ar(m);
ll a[n];
for (int i = 0; i < n; i++)
cin >> a[i], ans += a[i];
sort(a, a + n);
for ... | replace | 11 | 12 | 11 | 12 | 0 | |
p03038 | C++ | Runtime Error | #if 0
#endif
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < int(n); ++i)
using namespace std;
template <class A> void p(A a) { cout << (a) << endl; }
template <class A, class B> void p(A a, B b) {
cout << a << " ";
p(b);
}
template <class A, class B, class C> void p(A a, B b, C c) {
cout << a <<... | #if 0
#endif
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < int(n); ++i)
using namespace std;
template <class A> void p(A a) { cout << (a) << endl; }
template <class A, class B> void p(A a, B b) {
cout << a << " ";
p(b);
}
template <class A, class B, class C> void p(A a, B b, C c) {
cout << a <<... | replace | 74 | 75 | 74 | 75 | 0 | |
p03038 | Python | Runtime Error | def main():
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
BC = []
for _ in range(M):
B, C = map(int, input().split())
BC.append((B, C))
BC = sorted(BC, key=lambda x: x[1], reverse=True)
i = 0
for b, c in BC:
for _ in range(b):
... | def main():
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
BC = []
for _ in range(M):
B, C = map(int, input().split())
BC.append((B, C))
BC = sorted(BC, key=lambda x: x[1], reverse=True)
i = 0
for b, c in BC:
for _ in range(b):
... | replace | 11 | 12 | 11 | 12 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
// input
int n, m;
cin >> n >> m;
vector<int> a;
for (int i = 0; i < n; ++i) {
int tmp_a;
cin >> tmp_a;
a.push_back(tmp_a);
}
sort(a.begin(), a.end());
map<int, int> bc;
for (int i =... | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
// input
int n, m;
cin >> n >> m;
vector<int> a;
for (int i = 0; i < n; ++i) {
int tmp_a;
cin >> tmp_a;
a.push_back(tmp_a);
}
sort(a.begin(), a.end());
map<int, int> bc;
for (int i =... | insert | 36 | 36 | 36 | 40 | 0 | |
p03038 | Python | Time Limit Exceeded | from collections import defaultdict
N, M = map(int, input().split())
# Aは昇順に並べる
A = list(sorted(map(int, input().split())))
# B,Cの対応辞書を作り、C順に並べる
counter = defaultdict(int)
for _ in range(M):
B, C = map(int, input().split())
counter[C] += B
c_list = list(sorted(counter.keys(), reverse=True))
# Cを大きい順に個数分並べたリス... | from collections import defaultdict
N, M = map(int, input().split())
# Aは昇順に並べる
A = list(sorted(map(int, input().split())))
# B,Cの対応辞書を作り、C順に並べる
counter = defaultdict(int)
for _ in range(M):
B, C = map(int, input().split())
counter[C] += B
c_list = list(sorted(counter.keys(), reverse=True))
# Cを大きい順に個数分並べたリス... | insert | 24 | 24 | 24 | 26 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, a, b) for (int i = (a); i < (b); i++)
#define ALL(v) (v).begin(), (v).end()
#define INF 2e9
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
vector<pair<int, int>> p(m);
... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, a, b) for (int i = (a); i < (b); i++)
#define ALL(v) (v).begin(), (v).end()
#define INF 2e9
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
vector<pair<int, int>> p(m);
... | insert | 25 | 25 | 25 | 29 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<int> s(100009);
int main() {
long long N, M;
cin >> N >> M;
vector<long long> A(N), B(M), C(M);
for (int i = 0; i < N; i++)
cin >> A[i];
for (int i = 0; i < M; i++)
cin >> B[i] >> C[i];
sort(A.begin(), A.end());
vector<pair<long long, long long... | #include <bits/stdc++.h>
using namespace std;
vector<int> s(100009);
int main() {
long long N, M;
cin >> N >> M;
vector<long long> A(N), B(M), C(M);
for (int i = 0; i < N; i++)
cin >> A[i];
for (int i = 0; i < M; i++)
cin >> B[i] >> C[i];
sort(A.begin(), A.end());
vector<pair<long long, long long... | replace | 21 | 22 | 21 | 24 | 0 | |
p03038 | C++ | Time Limit Exceeded |
// #pragma GCC optimize ("-O3")
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>... |
// #pragma GCC optimize ("-O3")
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>... | insert | 247 | 247 | 247 | 251 | TLE | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const int mod = 1e9 + 7;
const ll INF = 1e18;
const int inf = 1e9;
bool sortbysecond(ii a, ii b) {
if (a.second != b.second) {
return a.second < b.second;
} else {
return a.first < b.first;
}
}
void solve() {... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const int mod = 1e9 + 7;
const ll INF = 1e18;
const int inf = 1e9;
bool sortbysecond(ii a, ii b) {
if (a.second != b.second) {
return a.second < b.second;
} else {
return a.first < b.first;
}
}
void solve() {... | replace | 37 | 41 | 37 | 41 | TLE | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
typedef vector<ll> V;
typedef vector<V> VV;
int main() {
// Happy hacking!
ll n, m;
V a;
ll replace_idx = 0;
vector<pair<ll, ll>> bc;
cin >> n >> m;
for (ll i = ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
typedef vector<ll> V;
typedef vector<V> VV;
int main() {
// Happy hacking!
ll n, m;
V a;
ll replace_idx = 0;
vector<pair<ll, ll>> bc;
cin >> n >> m;
for (ll i = ... | insert | 38 | 38 | 38 | 41 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
#define pb push_back
#define all(v) (v).begin(), (v).end()
ll mod = 1000000007;
ll INF = 1000000099;
void secondsort(vector<pair<ll, ll>> &v) {
for (ll i = 0; i < v.size(); i++) {
swap(v.at(i).first, v.at(i).se... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
#define pb push_back
#define all(v) (v).begin(), (v).end()
ll mod = 1000000007;
ll INF = 1000000099;
void secondsort(vector<pair<ll, ll>> &v) {
for (ll i = 0; i < v.size(); i++) {
swap(v.at(i).first, v.at(i).se... | insert | 15 | 15 | 15 | 16 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const pair<int, int> fd[] = {make_pair(1, 0), make_pair(-1, 0)... | #include <bits/stdc++.h>
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const pair<int, int> fd[] = {make_pair(1, 0), make_pair(-1, 0)... | insert | 74 | 74 | 74 | 78 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef pair<long long int, long long int> change;
bool pairCompare(const change &x, const change &y) {
return x.second > y.second;
}
int main() {
int n, m;
cin >> n >> m;
vector<long long int> a(n);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
... | #include <bits/stdc++.h>
using namespace std;
typedef pair<long long int, long long int> change;
bool pairCompare(const change &x, const change &y) {
return x.second > y.second;
}
int main() {
int n, m;
cin >> n >> m;
vector<long long int> a(n);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
... | replace | 31 | 37 | 31 | 37 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<ll, ll>;
ll n, m;
int main() {
cin >> n >> m;
vector<ll> a(n);
rep(i, n) { cin >> a[i]; }
vector<P> bc(n);
rep(i, m) { cin >> bc[i].second >> bc[i].first; }
sort(a.begin(), a.... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<ll, ll>;
ll n, m;
int main() {
cin >> n >> m;
vector<ll> a(n);
rep(i, n) { cin >> a[i]; }
vector<P> bc(m);
rep(i, m) { cin >> bc[i].second >> bc[i].first; }
sort(a.begin(), a.... | replace | 12 | 13 | 12 | 13 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
struct cardchange {
long B;
long C;
cardchange(int B2, int C2) {
B = B2;
C = C2;
}
bool operator<(const cardchange &another) const { return C < another.C; }
};
int main() {
long N, M;
std::cin >> N >> M;
std::vector<long> A;
for (lo... | #include <algorithm>
#include <iostream>
#include <vector>
struct cardchange {
long B;
long C;
cardchange(int B2, int C2) {
B = B2;
C = C2;
}
bool operator<(const cardchange &another) const { return C < another.C; }
};
int main() {
long N, M;
std::cin >> N >> M;
std::vector<long> A;
for (lo... | replace | 37 | 44 | 37 | 46 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N, M;
cin >> N >> M;
int64_t v = 0;
vector<int64_t> A(N);
vector<vector<int>> X(N, vector<int>(2));
for (int64_t i = 0; i < N; i++)
cin >> A[i];
sort(A.begin(), A.end());
for (int64_t i = 0; i < M; i++) {
cin >> X[i][1] >> X[i][... | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N, M;
cin >> N >> M;
int64_t v = 0;
vector<int64_t> A(N);
vector<vector<int>> X(M, vector<int>(2));
for (int64_t i = 0; i < N; i++)
cin >> A[i];
sort(A.begin(), A.end());
for (int64_t i = 0; i < M; i++) {
cin >> X[i][1] >> X[i][... | replace | 8 | 9 | 8 | 9 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
vector<pair<int, int>> bc(m);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a.begin(), a.end());
int b, c;
for (int i = 0; i < m; i++) {
cin >> b >> c;
bc[i] = make_pair(c, b);
}... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
vector<pair<int, int>> bc(m);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a.begin(), a.end());
int b, c;
for (int i = 0; i < m; i++) {
cin >> b >> c;
bc[i] = make_pair(c, b);
}... | insert | 33 | 33 | 33 | 35 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define fi first
#define se second
#define PI (acos(-1))
template <class T> inline ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define fi first
#define se second
#define PI (acos(-1))
template <class T> inline ... | replace | 84 | 85 | 84 | 85 | 0 | |
p03038 | 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(j, n) for (int j = 0; j < (n); ++j)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define drep2(j, n) for (int j = (n)-1; j >= 0; --j)
#define ... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(j, n) for (int j = 0; j < (n); ++j)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define drep2(j, n) for (int j = (n)-1; j >= 0; --j)
#define ... | replace | 77 | 78 | 77 | 84 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a.at(i);
}
sort(a.begin(), a.end());
/*for(int i=0; i<n; i++){
cout << a.at(i) << endl;
}
cout << endl;*/
vector<tuple<int, int>> bc(m);
int b, c;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a.at(i);
}
sort(a.begin(), a.end());
/*for(int i=0; i<n; i++){
cout << a.at(i) << endl;
}
cout << endl;*/
vector<tuple<int, int>> bc(m);
int b, c;... | replace | 38 | 39 | 38 | 39 | 0 | |
p03038 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
priority_queue<P> q;
vector<int> a(n), b(m), c(m);
rep(i, n) cin >> a[i];
rep(i, m) cin >> b[i] >> c[i];... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
priority_queue<P> q;
vector<int> a(n), b(m), c(m);
rep(i, n) cin >> a[i];
rep(i, m) cin >> b[i] >> c[i];
rep(i, n) q.push(mak... | delete | 0 | 1 | 0 | 0 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(x) (x).begin(), (x).end()
using ll = long long;
using P = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1001001001;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(x) (x).begin(), (x).end()
using ll = long long;
using P = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1001001001;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
... | replace | 38 | 39 | 38 | 39 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
int a[100006];
struct lin {
int num;
int value;
};
lin b[100006];
bool cmp(lin a, lin b) { return a.value > b.value; }
int main() {
int n;
int m;
cin >> n >> m;
long long sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i... | #include <algorithm>
#include <iostream>
using namespace std;
int a[100006];
struct lin {
int num;
int value;
};
lin b[100006];
bool cmp(lin a, lin b) { return a.value > b.value; }
int main() {
int n;
int m;
cin >> n >> m;
long long sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i... | replace | 36 | 37 | 36 | 37 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define all(a) a.begin(), a.end()
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, a, b) for (ll i = a; i < b; i++)
const int max_n = 1e5;
const ll mod = 1e9 + 7;
void send(int a, int b... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define all(a) a.begin(), a.end()
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, a, b) for (ll i = a; i < b; i++)
const int max_n = 1e5;
const ll mod = 1e9 + 7;
void send(int a, int b... | insert | 38 | 38 | 38 | 40 | TLE | |
p03038 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
int main() {
int N, M;
cin >> N >> M;
vector<ll> A(N);
vector<pair<ll, ll>> CB(M);
for (int i = 0; i < N; i++)
cin >> A[i];
for (int i = 0; i < M; i++)
cin >> CB[i].second >> CB[i].first;
sort(A.begin(), A.end());
sort(CB.begi... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
int main() {
int N, M;
cin >> N >> M;
vector<ll> A(N);
vector<pair<ll, ll>> CB(M);
for (int i = 0; i < N; i++)
cin >> A[i];
for (int i = 0; i < M; i++)
cin >> CB[i].second >> CB[i].first;
sort(A.begin(), A.end());
sort(CB.begi... | delete | 20 | 21 | 20 | 20 | TLE | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
//
long long num, que;
cin >> num >> que;
map<long long, long long> m;
vector<pair<long long, long long>> p(que);
for (long long i = 0; i < num; i++) {
long long tmp;
cin >> tmp;
m[tmp]++;
}
for (long long i = 0; i < que; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
//
long long num, que;
cin >> num >> que;
map<long long, long long> m;
vector<pair<long long, long long>> p(que);
for (long long i = 0; i < num; i++) {
long long tmp;
cin >> tmp;
m[tmp]++;
}
for (long long i = 0; i < que; i++) {
... | replace | 29 | 30 | 29 | 30 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
int main() {
long long N, M;
cin >> N >> M;
vector<int> A(N);
vector<pair<int, int>> BC(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
long long bsum = 0;
for (int i = 0; i < M; i++) {
int b, c;
cin >> b >> c;
... | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
int main() {
long long N, M;
cin >> N >> M;
vector<int> A(N);
vector<pair<int, int>> BC(M);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
long long bsum = 0;
for (int i = 0; i < M; i++) {
int b, c;
cin >> b >> c;
... | replace | 10 | 11 | 10 | 11 | 0 | |
p03038 | C++ | Time Limit Exceeded | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
#include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
multiset<int> s;
vector<vector<int>> v;
int n, m;
cin >> n >> m;
rep(i, n) {
int a;
cin ... | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
#include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
multiset<int> s;
vector<vector<int>> v;
int n, m;
cin >> n >> m;
rep(i, n) {
int a;
cin ... | insert | 26 | 26 | 26 | 31 | TLE | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map> // pair
#include <vector>
using namespace std;
int main() {
int n, m;
int a[100000];
int b, c, i;
long long int ans = 0;
cin >> n >> m;
vector<pair<int, int>> pairs(m);
for (i = 0; i < n; i++) {
cin >> a[i];
}
sort(a, a + n);
for (i = ... | #include <algorithm>
#include <iostream>
#include <map> // pair
#include <vector>
using namespace std;
int main() {
int n, m;
int a[100000];
int b, c, i;
long long int ans = 0;
cin >> n >> m;
vector<pair<int, int>> pairs(m);
for (i = 0; i < n; i++) {
cin >> a[i];
}
sort(a, a + n);
for (i = ... | replace | 31 | 32 | 31 | 32 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int N, M;
scanf("%d%d", &N, &M);
map<ll, int> A;
for (int i = 0; i < ... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int N, M;
scanf("%d%d", &N, &M);
map<ll, int> A;
for (int i = 0; i < ... | replace | 23 | 25 | 23 | 25 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll unsigned long long
bool f(pair<ll, ll> p1, pair<ll, ll> p2) {
if (p1.second == p2.second)
return p1.first > p2.first;
return p1.second > p2.second;
}
int main() {
ll n, m, i, j;
cin >> n >> m;
ll a[n];
vector<pair<ll, ll>> b(n);
for (i = 0; i ... | #include <bits/stdc++.h>
using namespace std;
#define ll unsigned long long
bool f(pair<ll, ll> p1, pair<ll, ll> p2) {
if (p1.second == p2.second)
return p1.first > p2.first;
return p1.second > p2.second;
}
int main() {
ll n, m, i, j;
cin >> n >> m;
ll a[n];
vector<pair<ll, ll>> b(m);
for (i = 0; i ... | replace | 14 | 15 | 14 | 15 | 0 | |
p03038 | Python | Time Limit Exceeded | import bisect
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
BC = []
for _ in range(M):
b, c = map(int, input().split())
BC.append((b, c))
BC.sort(reverse=True, key=lambda x: x[1])
ans, i = 0, 0
for bc in BC:
ti = bisect.bisect(A[i:], bc[1]) + i
if (ti > i) and (bc[0] >... | import bisect
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
BC = []
for _ in range(M):
b, c = map(int, input().split())
BC.append((b, c))
BC.sort(reverse=True, key=lambda x: x[1])
ans, i = 0, 0
for bc in BC:
ti = bisect.bisect(A, bc[1])
if (ti > i) and (bc[0] >= (ti - ... | replace | 14 | 15 | 14 | 15 | TLE | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <chrono>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
using lli = long long int;
using Vint = std::vector<int>;
using Vlli = std::vector<lli>;
using Wint = std:... | #include <algorithm>
#include <chrono>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
using lli = long long int;
using Vint = std::vector<int>;
using Vlli = std::vector<lli>;
using Wint = std:... | replace | 121 | 122 | 121 | 122 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (long long int i = 0; i < n; i++)
#define _rep(i, m, n) for (long long int i = m; i < n; i++)
#define print(n) std::cout << n << std::endl
#define _print(n) std::cout << n
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int N = 1000000;
const ll ... | #include <bits/stdc++.h>
#define rep(i, n) for (long long int i = 0; i < n; i++)
#define _rep(i, m, n) for (long long int i = m; i < n; i++)
#define print(n) std::cout << n << std::endl
#define _print(n) std::cout << n
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int N = 1000000;
const ll ... | replace | 52 | 53 | 52 | 53 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int N, M, A[100001], B[100001], C[100001];
int main() {
cin >> N >> M;
for (int i = 0; i < N; i++)
cin >> A[i];
for (int i = 0; i < M; i++)
cin >> B[i] >> C[i];
sort(A, A + N);
vector<pair<int, int>> CB(M);
for (int i = 0; i < M; i++)
CB[i] = mak... | #include <bits/stdc++.h>
using namespace std;
int N, M, A[100001], B[100001], C[100001];
int main() {
cin >> N >> M;
for (int i = 0; i < N; i++)
cin >> A[i];
for (int i = 0; i < M; i++)
cin >> B[i] >> C[i];
sort(A, A + N);
vector<pair<int, int>> CB(M);
for (int i = 0; i < M; i++)
CB[i] = mak... | replace | 27 | 28 | 27 | 29 | TLE | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef uns... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef uns... | replace | 28 | 29 | 28 | 29 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define int long long
#define pie 3.141592653589793238462... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define int long long
#define pie 3.141592653589793238462... | replace | 83 | 84 | 83 | 84 | 0 | |
p03038 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#define INF 1e9
#define INFLL 1e18
#define EPS 1e-9
#define MOD 1000000007
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define REP1(i, n) for (ll i = 1, i##_len = (n); i <= i##_len; ++i)
#define REPR(i, n) for (ll i = (n)-1; i >= 0; --i)
#de... | #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#define INF 1e9
#define INFLL 1e18
#define EPS 1e-9
#define MOD 1000000007
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define REP1(i, n) for (ll i = 1, i##_len = (n); i <= i##_len; ++i)
#define REPR(i, n) for (ll i = (n)-1; i >= 0; --i)
#de... | replace | 16 | 17 | 16 | 17 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#define ll long long
using namespace std;
long long gcd(int x, int y) {
if (x == 0)
return y;
return gcd(y % x, x);
}
long long lcm(int x, int y) {
if (y == 0)... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#define ll long long
using namespace std;
long long gcd(int x, int y) {
if (x == 0)
return y;
return gcd(y % x, x);
}
long long lcm(int x, int y) {
if (y == 0)... | insert | 59 | 59 | 59 | 60 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (long long int i = 0; i < n; i++)
#define _rep(i, m, n) for (long long int i = m; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int N = 1000000;
const ll mod = 1000000007;
using Graph = vector<vector<int>>;
const int dx[4] = {1, 0, ... | #include <bits/stdc++.h>
#define rep(i, n) for (long long int i = 0; i < n; i++)
#define _rep(i, m, n) for (long long int i = m; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int N = 1000000;
const ll mod = 1000000007;
using Graph = vector<vector<int>>;
const int dx[4] = {1, 0, ... | insert | 34 | 34 | 34 | 36 | 0 | |
p03038 | Python | Time Limit Exceeded | N, M = map(int, input().split())
A = list(map(int, input().split()))
CB = []
for _ in range(M):
b, c = map(int, input().split())
CB.append((c, b))
# ascend
A.sort()
# descend
CB.sort(reverse=True)
# fill convert ary
conv = []
for cb in CB:
c, b = cb
conv.extend([c] * b)
cl = len(conv)
sum = 0
for i... | N, M = map(int, input().split())
A = list(map(int, input().split()))
CB = []
for _ in range(M):
b, c = map(int, input().split())
CB.append((c, b))
# ascend
A.sort()
# descend
CB.sort(reverse=True)
# fill convert ary
conv = []
for cb in CB:
c, b = cb
conv.extend([c] * b)
if len(conv) >= N:
... | insert | 18 | 18 | 18 | 20 | TLE | |
p03038 | Python | Runtime Error | from heapq import heapify, heappop, heappush
from sys import stdin
N, M = map(int, input().split())
A = list(map(int, stdin.readline().split()))
heapify(A)
BC = [None] * M
for i in range(M):
BC[i] = tuple(map(int, stdin.readline().split()))
BC = sorted(BC, key=lambda x: x[1], reversed=True)
print(BC)
enough = Fa... | from heapq import heapify, heappop, heappush
from sys import stdin
N, M = map(int, input().split())
A = list(map(int, stdin.readline().split()))
heapify(A)
BC = [None] * M
for i in range(M):
BC[i] = tuple(map(int, stdin.readline().split()))
BC = sorted(BC, key=lambda x: x[1], reverse=True)
enough = False
for bc i... | replace | 9 | 12 | 9 | 10 | TypeError: 'reversed' is an invalid keyword argument for sort() | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03038/Python/s447667839.py", line 10, in <module>
BC = sorted(BC, key=lambda x: x[1], reversed=True)
TypeError: 'reversed' is an invalid keyword argument for sort()
|
p03038 | Python | Runtime Error | N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
BC = [None] * M
for i in range(M):
BC[i] = tuple(map(int, input().split()))
BC.sort(key=lambda tpl: tpl[1], reverse=True) # sort by C descendant
D = [0] * N
i = 0
j = 0
while i < N and j < M:
b, c = BC[j]
for k in range(i, i + b)... | N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
BC = [None] * M
for i in range(M):
BC[i] = tuple(map(int, input().split()))
BC.sort(key=lambda tpl: tpl[1], reverse=True) # sort by C descendant
D = [0] * N
i = 0
j = 0
while i < N and j < M:
b, c = BC[j]
for k in range(i, min(i ... | replace | 12 | 13 | 12 | 13 | 0 | |
p03038 | Python | Runtime Error | n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
hand = []
for _ in range(m):
b, c = map(int, input().split())
hand.append((b, c))
hand.sort(key=lambda x: x[1], reverse=True)
i = 0
lena = len(a)
flag = False
for h in hand:
for j in range(h[0]):
if i < lena and a[i] >= h... | n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
hand = []
for _ in range(m):
b, c = map(int, input().split())
hand.append((b, c))
hand.sort(key=lambda x: x[1], reverse=True)
i = 0
lena = len(a)
flag = False
for h in hand:
for j in range(h[0]):
if i >= lena:
... | replace | 14 | 15 | 14 | 18 | 0 | |
p03038 | Python | Runtime Error | N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
BC = [list(map(int, input().split())) for i in range(M)]
BC = sorted(BC, key=lambda x: -x[1])
i = 0
for B, C in BC:
for _ in range(B):
if A[i] < C:
A[i] = C
i += 1
else:
print(sum(A))
... | N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
BC = [list(map(int, input().split())) for i in range(M)]
BC = sorted(BC, key=lambda x: -x[1])
i = 0
for B, C in BC:
for _ in range(B):
if i < N and A[i] < C:
A[i] = C
i += 1
else:
print(... | replace | 8 | 9 | 8 | 9 | 0 | |
p03038 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define LL long long
int n, m;
vector<LL> a;
vector<pair<int, LL>> v;
int main() {
cin >> n >> m;
REP(i, n) {
LL tmp;
cin >> tmp;
a.pu... | #include "bits/stdc++.h"
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define LL long long
int n, m;
vector<LL> a;
vector<pair<int, LL>> v;
int main() {
cin >> n >> m;
REP(i, n) {
LL tmp;
cin >> tmp;
a.pu... | replace | 32 | 33 | 32 | 33 | 0 | |
p03038 | Python | Time Limit Exceeded | import sys
from heapq import heapify, heapreplace
def main():
input = sys.stdin.readline
N, M = map(int, input().split())
As = list(map(int, input().split()))
heapify(As)
BCs = [None] * M
for i in range(M):
BCs[i] = list(map(int, input().split()))
BCs = reversed(sorted(BCs, key=lam... | import sys
from heapq import heapify, heapreplace
def main():
input = sys.stdin.readline
N, M = map(int, input().split())
As = list(map(int, input().split()))
heapify(As)
BCs = [None] * M
for i in range(M):
BCs[i] = list(map(int, input().split()))
BCs = reversed(sorted(BCs, key=lam... | replace | 15 | 17 | 15 | 19 | TLE | |
p03038 | Python | Runtime Error | import heapq
from sys import exit
N, M = map(int, input().split())
A = list(map(int, input().split()))
BC = sorted(
[tuple(map(int, input().split())) for _ in range(M)],
key=lambda x: x[1],
reverse=True,
)
heapq.heapify(A)
ans = sum(A)
for b, c in BC:
for _ in range(b):
a = heapq.heappop(A)
... | import heapq
from sys import exit
N, M = map(int, input().split())
A = list(map(int, input().split()))
BC = sorted(
[tuple(map(int, input().split())) for _ in range(M)],
key=lambda x: x[1],
reverse=True,
)
heapq.heapify(A)
ans = sum(A)
for b, c in BC:
for _ in range(b):
if len(A) == 0:
... | insert | 15 | 15 | 15 | 18 | 0 | |
p03038 | Python | Time Limit Exceeded | #!/usr/bin/env python3
import heapq
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
bc = [list(map(int, input().split())) for _ in range(m)]
# bc = sorted(bc, key=lambda x: x[1], reverse=True)
# print(bc)
heapq.heapify(a)
for b, c in bc:
for i in range(b):
num = heapq.heappop(a... | #!/usr/bin/env python3
import heapq
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
bc = [list(map(int, input().split())) for _ in range(m)]
bc = sorted(bc, key=lambda x: x[1], reverse=True)
# print(bc)
heapq.heapify(a)
for b, c in bc:
for i in range(b):
num = heapq.heappop(a)
... | replace | 7 | 8 | 7 | 8 | TLE | |
p03038 | Python | Runtime Error | n, m = map(int, input().split())
a = list(map(int, input().split()))
bc = [tuple(map(int, input().split())) for _ in range(m)]
a.sort()
bc.sort(reverse=True, key=lambda x: x[1])
last_idx = len(a) - 1
idx = 0
for e in bc:
b, c = e
for i in range(b):
if i + idx > last_idx:
break
if a[i... | n, m = map(int, input().split())
a = list(map(int, input().split()))
bc = [tuple(map(int, input().split())) for _ in range(m)]
a.sort()
bc.sort(reverse=True, key=lambda x: x[1])
last_idx = len(a) - 1
idx = 0
for e in bc:
b, c = e
for i in range(b):
if i + idx > last_idx:
break
if a[i... | replace | 14 | 22 | 14 | 15 | 0 | |
p03038 | Python | Runtime Error | from collections import defaultdict
import sys
input = sys.stdin.readline
N, M = [int(item) for item in input().split()]
A = [int(item) for item in input().split()]
A.sort()
new_dict = defaultdict(lambda: 0)
for i in range(M):
b, c = [int(item) for item in input().split()]
new_dict[c] += b
new_dict = sorted(... | from collections import defaultdict
import sys
input = sys.stdin.readline
N, M = [int(item) for item in input().split()]
A = [int(item) for item in input().split()]
A.sort()
new_dict = defaultdict(lambda: 0)
for i in range(M):
b, c = [int(item) for item in input().split()]
new_dict[c] += b
new_dict = sorted(... | replace | 16 | 21 | 16 | 22 | 0 | |
p03038 | Python | Runtime Error | N, M = map(int, input().split())
As = list(map(int, input().split()))
BCs = [tuple(map(int, input().split())) for _ in range(M)]
As.sort()
BCs.sort(key=lambda x: x[1], reverse=True)
iA = 0
for B, C in BCs:
for j in range(B):
if As[iA] < C:
As[iA] = C
iA += 1
else:
... | N, M = map(int, input().split())
As = list(map(int, input().split()))
BCs = [tuple(map(int, input().split())) for _ in range(M)]
As.sort()
BCs.sort(key=lambda x: x[1], reverse=True)
iA = 0
for B, C in BCs:
for j in range(B):
if As[iA] < C:
As[iA] = C
iA += 1
if iA >= N:... | insert | 13 | 13 | 13 | 15 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
#define rep(i, s) for (int i = 0; i < s; ++i)
#define all(v) (v.begin(), v.end())
#define COUT(x) cout << #x << " = " << (x) << "... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
#define rep(i, s) for (int i = 0; i < s; ++i)
#define all(v) (v.begin(), v.end())
#define COUT(x) cout << #x << " = " << (x) << "... | insert | 50 | 50 | 50 | 52 | TLE | |
p03038 | Python | Runtime Error | n, m = map(int, input().split())
A = list(map(int, input().split()))
CB = []
for _ in range(m):
b, c = map(int, input().split())
CB.append([c, b])
CB.sort(reverse=True)
A.sort()
index = 0
for i in range(m):
if index >= n:
break
elif A[index] >= CB[i][0]:
break
for j in range(CB[i]... | n, m = map(int, input().split())
A = list(map(int, input().split()))
CB = []
for _ in range(m):
b, c = map(int, input().split())
CB.append([c, b])
CB.sort(reverse=True)
A.sort()
index = 0
for i in range(m):
if index >= n:
break
elif A[index] >= CB[i][0]:
break
for j in range(CB[i]... | replace | 18 | 19 | 18 | 21 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <cstring>
#include <queue>
#define mp make_pair
#define pb push_back
#define p push
#define FOR(a, c) for (int a = 0; a < c; a++)
#define ll long long int
#define getI(a) scanf("%d", &a)
#define getII(a, b) scanf("%d%d", &a, &b)
#define getIII(a, b, c) scanf("%d%d%d", &a, &b, &c)
#de... | #include <bits/stdc++.h>
#include <cstring>
#include <queue>
#define mp make_pair
#define pb push_back
#define p push
#define FOR(a, c) for (int a = 0; a < c; a++)
#define ll long long int
#define getI(a) scanf("%d", &a)
#define getII(a, b) scanf("%d%d", &a, &b)
#define getIII(a, b, c) scanf("%d%d%d", &a, &b, &c)
#de... | replace | 71 | 72 | 71 | 72 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> a;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
a.push_back(x);
}
vector<pair<int, int>> op(m);
for (int i = 0; i < m; i++) {
cin >> op[i].first ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> a;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
a.push_back(x);
}
vector<pair<int, int>> op(m);
for (int i = 0; i < m; i++) {
cin >> op[i].first ... | replace | 24 | 25 | 24 | 25 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
int main(int argc, char *argv[]) {
int n, m, i, j;
ll answer;
int tmpa, tmpb, tm... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
int main(int argc, char *argv[]) {
int n, m, i, j;
ll answer;
int tmpa, tmpb, tm... | replace | 21 | 22 | 21 | 22 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bits/stdc++.h>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#includ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#includ... | replace | 67 | 68 | 67 | 68 | TLE | |
p03038 | C++ | Runtime Error | // Created by martinezdiego on 27/5/19
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
int n, m;
cin >> n >> m;
int a[n];
pair<int, int> bc[m];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a, a + n);
for (int i = 0; i < m; i++) {
cin >> bc[i... | // Created by martinezdiego on 27/5/19
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
int n, m;
cin >> n >> m;
int a[n];
pair<int, int> bc[m];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a, a + n);
for (int i = 0; i < m; i++) {
cin >> bc[i... | replace | 22 | 24 | 22 | 24 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define fornum(A, B, C) for (A = B; A < C; A++)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
/////////////////////////////////////////////////////
ll N, M;
double dd, cc;
ll A[101010];
ll i, j, k, l;
vector<pll> cbv;
ll a... | #include <bits/stdc++.h>
#define ll long long
#define fornum(A, B, C) for (A = B; A < C; A++)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
/////////////////////////////////////////////////////
ll N, M;
double dd, cc;
ll A[101010];
ll i, j, k, l;
vector<pll> cbv;
ll a... | replace | 33 | 34 | 33 | 34 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <stack>
#include <vector>
using namespace std;
int main() {
int N, M;
scanf("%d %d", &N, &M);
long long int b, c;
vector<long long int> A(N);
vector<pair<long long int, long long int>> BC;
int i, j = 0, ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <stack>
#include <vector>
using namespace std;
int main() {
int N, M;
scanf("%d %d", &N, &M);
long long int b, c;
vector<long long int> A(N);
vector<pair<long long int, long long int>> BC;
int i, j = 0, ... | insert | 31 | 31 | 31 | 33 | 0 | |
p03038 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF_INT (INT_MAX / 2)
#define INF_LONG (LONG_MAX / 2)
// #define DEBUG true
#define DEBUG false
using namespace std;
const int MAX = 1... | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF_INT (INT_MAX / 2)
#define INF_LONG (LONG_MAX / 2)
// #define DEBUG true
#define DEBUG false
using namespace std;
const int MAX = 1... | replace | 55 | 56 | 55 | 56 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
#define int long
int N, M;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++)
cin >> A[i];
vector<pair<int, int>> CB(N);
for (int i = 0; i < M; i++)
cin >> CB[i].second >> CB[i].first;
sort(CB.begin(), CB.end(), greater<pair<int,... | #include <bits/stdc++.h>
using namespace std;
int main() {
#define int long
int N, M;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++)
cin >> A[i];
vector<pair<int, int>> CB(M);
for (int i = 0; i < M; i++)
cin >> CB[i].second >> CB[i].first;
sort(CB.begin(), CB.end(), greater<pair<int,... | replace | 9 | 10 | 9 | 10 | 0 | |
p03038 | C++ | Runtime Error | /*Function Template*/
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pint;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define Rep(i, n) for (ll i = 1; i < (n); i++)
#define ALL(a) (a).begin(), (a).end()
#define IOS ... | /*Function Template*/
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pint;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define Rep(i, n) for (ll i = 1; i < (n); i++)
#define ALL(a) (a).begin(), (a).end()
#define IOS ... | insert | 133 | 133 | 133 | 135 | 0 | |
p03038 | 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++)
int main() {
int N, M;
cin >> N >> M;
vector<int> a(N);
rep(i, N) cin >> a[i];
map<int, int, greater<int>> mp;
rep(i, M) {
int b, c;
cin >> b >> c;
mp[c] += b;
}
priority_queue... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int N, M;
cin >> N >> M;
vector<int> a(N);
rep(i, N) cin >> a[i];
map<int, int, greater<int>> mp;
rep(i, M) {
int b, c;
cin >> b >> c;
mp[c] += b;
}
priority_queue... | replace | 19 | 20 | 19 | 20 | TLE | |
p03038 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#inc... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#inc... | insert | 94 | 94 | 94 | 98 | TLE | |
p03038 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <bitset>
using namespace std;
#define M 1000000007
#define pb push_back
#define f first
#define s second
#define rep(i, st, ed) for (ll i = st; i < ed; i++)
#define repn(i, st, ed) for (ll i = st; i <= ed; i++)
#define repb(i, ed, st) for (ll i = ed; i >= st; i--)
#define all(v) v.be... | #include <bits/stdc++.h>
#include <bitset>
using namespace std;
#define M 1000000007
#define pb push_back
#define f first
#define s second
#define rep(i, st, ed) for (ll i = st; i < ed; i++)
#define repn(i, st, ed) for (ll i = st; i <= ed; i++)
#define repb(i, ed, st) for (ll i = ed; i >= st; i--)
#define all(v) v.be... | replace | 53 | 54 | 53 | 54 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.