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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
#define times(n) for (int i = 0; i < n; i++)
int main() {
int n, m, j;
scanf("%d%d", &n, &m);
vector<vector<int>> s(n + 1);
int p[m], y[m];
times(m) scanf("%d%d", &p[i], &y[i]), s[p[i]].push_back(y[i]);
times(n) sort(s[i + 1].begi... | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
#define times(n) for (int i = 0; i < n; i++)
int main() {
int n, m, j;
scanf("%d%d", &n, &m);
vector<vector<int>> s(n + 1);
int p[m], y[m];
times(m) scanf("%d%d", &p[i], &y[i]), s[p[i]].push_back(y[i]);
times(n) sort(s[i + 1].begi... | replace | 12 | 13 | 12 | 14 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
vector<pair<int, int>> pys;
vector<int> mp[N + 1];
for (i... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
vector<pair<int, int>> pys;
vector<int> mp[N + 1];
for (i... | replace | 31 | 32 | 31 | 32 | TLE | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REPS(i, n) for (int i = 1, i##_len = (n); i < i##_len; ++i)
#define ALL(x) (x).begin(), (x).end()
#define PRINT(A) std::cout << (#A) << ":" << (A) << std::endl;
typedef long long int ll;
const int MOD = 1e9 + 7;
const i... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REPS(i, n) for (int i = 1, i##_len = (n); i < i##_len; ++i)
#define ALL(x) (x).begin(), (x).end()
#define PRINT(A) std::cout << (#A) << ":" << (A) << std::endl;
typedef long long int ll;
const int MOD = 1e9 + 7;
const i... | replace | 15 | 17 | 15 | 17 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
string buildString(int a, int b) {
stringstream ss;
stringstream ss2;
ss << a;
ss2 << b;
string as = ss.str();
for (int i = as.size(); i < 6; i++) {
as = '0' + as;
}
string bs = ss2.str();
for (int i = bs.size(); i < 6; i++) {
bs = '0' + b... | #include <bits/stdc++.h>
using namespace std;
string buildString(int a, int b) {
stringstream ss;
stringstream ss2;
ss << a;
ss2 << b;
string as = ss.str();
for (int i = as.size(); i < 6; i++) {
as = '0' + as;
}
string bs = ss2.str();
for (int i = bs.size(); i < 6; i++) {
bs = '0' + b... | replace | 49 | 50 | 49 | 50 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define sz(x) int(x.size())
#define ALL(c) (c).begin(), (c).end()
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v, x) (std::find(v.b... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define sz(x) int(x.size())
#define ALL(c) (c).begin(), (c).end()
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v, x) (std::find(v.b... | replace | 52 | 53 | 52 | 53 | TLE | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
#define m0(x) memset(x, 0, sizeof(x))
int dx4[4] = {1, 0, -1, 0}, dy4[4] = {0, 1, 0, -1};
i... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
#define m0(x) memset(x, 0, sizeof(x))
int dx4[4] = {1, 0, -1, 0}, dy4[4] = {0, 1, 0, -1};
i... | replace | 17 | 18 | 17 | 18 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
static const int INF(1 << 30);
int main() {
int N, M;
cin >> N >> M;
vector<tuple<int, int, int>> city;
vector<pair<int, int>> ans(N);
rep(i, M) {
int p, y;
cin >>... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
static const int INF(1 << 30);
int main() {
int N, M;
cin >> N >> M;
vector<tuple<int, int, int>> city;
vector<pair<int, int>> ans(M);
rep(i, M) {
int p, y;
cin >>... | replace | 11 | 12 | 11 | 12 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <numeric>
#include <sstream>
#include <utility>
#include <vector>
using namespace std;
using ll = long long int;
constexpr int INF = 1 << 29;
constexpr ll MOD = ll(1e9 + 7);
int n, m;
int p[100000];
l... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <numeric>
#include <sstream>
#include <utility>
#include <vector>
using namespace std;
using ll = long long int;
constexpr int INF = 1 << 29;
constexpr ll MOD = ll(1e9 + 7);
int n, m;
int p[100000];
l... | replace | 27 | 29 | 27 | 29 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int n, mm;
cin >> n >> mm;
vector<vector<ll>> m(n);
vector<pair<int, ll>> v(mm);
for (int i = 0; i < mm; i++... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int n, mm;
cin >> n >> mm;
vector<vector<ll>> m(n);
vector<pair<int, ll>> v(mm);
for (int i = 0; i < mm; i++... | replace | 25 | 26 | 25 | 27 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin... | replace | 24 | 26 | 24 | 26 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int P[M], Y[M];
for (int i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
}
vector<int> vec[100001];
for (int i = 0; i < M; i++) {
vec[P[i]].push_back(Y[i]);
}
for (int i = 1; i <= N;... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int P[M], Y[M];
for (int i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
}
vector<int> vec[100001];
for (int i = 0; i < M; i++) {
vec[P[i]].push_back(Y[i]);
}
for (int i = 1; i <= N;... | replace | 20 | 23 | 20 | 22 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, ll> P;
const ll mod = 1e9 + 7;
co... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, ll> P;
const ll mod = 1e9 + 7;
co... | replace | 33 | 36 | 33 | 35 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
struct city {
int pref;
int year;
};
int main() {
int n, m;
cin >> n >> m;
vector<city> v;
for (int i = 0; i < m; i++) {
int p, y;
cin >> p >> y;
city c = {p, y};
v.push_back(c);
}
map<int, vector<int>> table;
for (int i = 0; i < m; i++... | #include <bits/stdc++.h>
using namespace std;
struct city {
int pref;
int year;
};
int main() {
int n, m;
cin >> n >> m;
vector<city> v;
for (int i = 0; i < m; i++) {
int p, y;
cin >> p >> y;
city c = {p, y};
v.push_back(c);
}
map<int, vector<int>> table;
for (int i = 0; i < m; i++... | replace | 35 | 36 | 35 | 37 | TLE | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, m, x;
cin >> n >> m;
vector<int> c(n), d(n);
vector<vector<int>> e(n + 1);
for (int i = 0; i < m; i++) {
cin >> c[i] >> d[i];
e[c[i]].push_back(d[i]);
}
for (int i = 0; i < n + 1; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, m, x;
cin >> n >> m;
vector<int> c(m), d(m);
vector<vector<int>> e(n + 1);
for (int i = 0; i < m; i++) {
cin >> c[i] >> d[i];
e[c[i]].push_back(d[i]);
}
for (int i = 0; i < n + 1; i++) {
... | replace | 7 | 8 | 7 | 8 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> pre_year(100001);
vector<int> pre(100001);
vector<int> year(100001);
for (int i = 0; i < M; i++) {
cin >> pre[i] >> year[i];
pre_year[pre[i]].push_back(year[i]);
sort(pre_year[pre[i]].begin... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> pre_year(100001);
vector<int> pre(100001);
vector<int> year(100001);
for (int i = 0; i < M; i++) {
cin >> pre[i] >> year[i];
pre_year[pre[i]].push_back(year[i]);
}
for (int i = 1; i <= N; i... | replace | 14 | 15 | 14 | 17 | TLE | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> PA;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i, x) for (long long i = 0; i < x; i++)
#define repn(i, x) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> PA;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i, x) for (long long i = 0; i < x; i++)
#define repn(i, x) ... | replace | 33 | 34 | 33 | 34 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
int n, m;
cin >> n >> m;
vector<int> v[n];
int p[m], y[m];
for (int i = 0; i < m; i++) {
cin >> p[i] >> y[i];
v[--p[i]].push_back(y[i]);
}
for (int i = 0; i < n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
int n, m;
cin >> n >> m;
vector<int> v[n];
int p[m], y[m];
for (int i = 0; i < m; i++) {
cin >> p[i] >> y[i];
v[--p[i]].push_back(y[i]);
}
for (int i = 0; i < n; i++) {
... | replace | 20 | 21 | 20 | 21 | TLE | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
using... | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
using... | replace | 56 | 57 | 56 | 57 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#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 INF 1000000000000
using ll = long long;
int main() {
int n, m;
cin >> n >> m;
vector<ll> p(m), y(m);
vector<vector<ll>> py(n);
rep(i, m) {
cin ... | #include <bits/stdc++.h>
using namespace std;
#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 INF 1000000000000
using ll = long long;
int main() {
int n, m;
cin >> n >> m;
vector<ll> p(m), y(m);
vector<vector<ll>> py(n);
rep(i, m) {
cin ... | replace | 17 | 18 | 17 | 18 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, M;
cin >> N >> M;
vector<vector<pii>> PY(N + 1);
vector<pii> res(N);
for (int i = 0; i < M; i++) {
int p, y;
cin >> p >> y;
PY[p].push_back(make_pair(y, i));... | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, M;
cin >> N >> M;
vector<vector<pii>> PY(N + 1);
vector<pii> res(M);
for (int i = 0; i < M; i++) {
int p, y;
cin >> p >> y;
PY[p].push_back(make_pair(y, i));... | replace | 11 | 12 | 11 | 12 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long int;
usin... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long int;
usin... | replace | 172 | 173 | 172 | 173 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int p[100001], y[100001];
vector<int> vec[100001];
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> p[i] >> y[i];
vec[p[i]].push_back(y[i]);
}
for (int i = 0; i < N; i++) {
sort(vec[i + 1].begin(), vec[i + 1].end());
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int p[100001], y[100001];
vector<int> vec[100001];
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> p[i] >> y[i];
vec[p[i]].push_back(y[i]);
}
for (int i = 0; i < N; i++) {
sort(vec[i + 1].begin(), vec[i + 1].end());
}
... | replace | 18 | 24 | 18 | 21 | TLE | |
p03221 | C++ | Time Limit Exceeded |
// include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#inclu... |
// include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#inclu... | replace | 105 | 106 | 105 | 106 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define MOD 1000000007
#define PI 3.141592653589793
const int INF = 100000000;
int dx[] = {0, 1, -1, 0, 1, -1, 1, -1};
int dy[] = {1, 0, 0, -1, 1, -1, -1, 1};
int main() {
int n, m;
cin >> n >> m;
vector<tuple<int... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define MOD 1000000007
#define PI 3.141592653589793
const int INF = 100000000;
int dx[] = {0, 1, -1, 0, 1, -1, 1, -1};
int dy[] = {1, 0, 0, -1, 1, -1, -1, 1};
int main() {
int n, m;
cin >> n >> m;
vector<tuple<int... | replace | 33 | 40 | 33 | 42 | TLE | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
int main() {
// 入力
long N, M;
cin >> N >> M;
vector<long> P(M);
vector<pair<pair<long, long>, long>> cities(M);
for (long i = 0; i < M; i++) {
long Y;
cin >> P[i] >> Y;
cities[i] = make_pair(mak... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
int main() {
// 入力
long N, M;
cin >> N >> M;
vector<long> P(M);
vector<pair<pair<long, long>, long>> cities(M);
for (long i = 0; i < M; i++) {
long Y;
cin >> P[i] >> Y;
cities[i] = make_pair(mak... | replace | 24 | 25 | 24 | 25 | 0 | |
p03221 | 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 | 145 | 146 | 145 | 146 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
ll b[100000];
ll a[100000];
vector<ll> v[100000];
int main() {
ll n, m;
cin >> n >> m;
for (ll i = 0; i < m; i++) {
cin >> a[i] >> b[i]... | #include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
ll b[100010];
ll a[100010];
vector<ll> v[100010];
int main() {
ll n, m;
cin >> n >> m;
for (ll i = 0; i < m; i++) {
cin >> a[i] >> b[i]... | replace | 9 | 12 | 9 | 12 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> p(m), y(m);
rep(i, m) cin >> p[i] >> y[i];
vector<vector<int>> cor(n + 1);
rep(i, m)... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> p(m), y(m);
rep(i, m) cin >> p[i] >> y[i];
vector<vector<int>> cor(n + 1);
rep(i, m)... | replace | 19 | 20 | 19 | 21 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<vector<pair<ll, ll>>> p(m, vector<pair<ll, ll>>(0));
vector<string> id(m);
for (int i = 0; i < m; i++) {
ll place, year;
cin >> place >> year;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<vector<pair<ll, ll>>> p(n, vector<pair<ll, ll>>(0));
vector<string> id(m);
for (int i = 0; i < m; i++) {
ll place, year;
cin >> place >> year;
... | replace | 9 | 10 | 9 | 10 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = (0); i < (n); ++i)
#define rng(x) (x).begin(), (x).end()
#define rrng(x) (x).rbegin(), (x).rend()
#define debug(x) cout << #x << " = " << (x) << endl;
#define SUM(x) accumulate(rng(x), 0)
#define fi first
#defin... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = (0); i < (n); ++i)
#define rng(x) (x).begin(), (x).end()
#define rrng(x) (x).rbegin(), (x).rend()
#define debug(x) cout << #x << " = " << (x) << endl;
#define SUM(x) accumulate(rng(x), 0)
#define fi first
#defin... | replace | 48 | 49 | 48 | 49 | 0 | |
p03221 | C++ | Time Limit Exceeded | //------------------------------------------
// C++ templete
//------------------------------------------
#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
using ll = long long;
#define endl "\n"
// typedef
//------------------------------------------
typedef pair<int, int> PII;
typedef vector<int> VI;... | //------------------------------------------
// C++ templete
//------------------------------------------
#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
using ll = long long;
#define endl "\n"
// typedef
//------------------------------------------
typedef pair<int, int> PII;
typedef vector<int> VI;... | replace | 140 | 147 | 140 | 141 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> vec(n);
vector<pair<int, int>> city(m);
for (int i = 0; i < m; i++) {
int p, y;
cin >> p >> y;
vec[p - 1].push_back(y);
city[i] = make_pair(p - 1, y);
}
for (int i = 0; i < n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> vec(n);
vector<pair<int, int>> city(m);
for (int i = 0; i < m; i++) {
int p, y;
cin >> p >> y;
vec[p - 1].push_back(y);
city[i] = make_pair(p - 1, y);
}
for (int i = 0; i < n; i++) {
... | replace | 18 | 19 | 18 | 19 | TLE | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;... | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;... | replace | 39 | 40 | 39 | 40 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<pair<pair<long long, long long>, long long>> ypx(m);
vector<long long> ans(m);
vector<long long> cnt(n);
for (int i = 0; i < m; ++i) {
cin >... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<pair<pair<long long, long long>, long long>> ypx(m);
vector<long long> ans(m);
vector<long long> cnt(n + 1);
for (int i = 0; i < m; ++i) {
c... | replace | 13 | 14 | 13 | 14 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<ll, ll> Pll;
typedef pair<int, Pii> P1;
#define rep(i, n) for (int i = 0; i < n; i++)
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define lb(vec, ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<ll, ll> Pll;
typedef pair<int, Pii> P1;
#define rep(i, n) for (int i = 0; i < n; i++)
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define lb(vec, ... | replace | 37 | 39 | 37 | 41 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<ll, ll> Pll;
typedef pair<int, Pii> P1;
#define rep(i, n) for (int i = 0; i < n; i++)
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define lb(vec, ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<ll, ll> Pll;
typedef pair<int, Pii> P1;
#define rep(i, n) for (int i = 0; i < n; i++)
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define lb(vec, ... | replace | 36 | 38 | 36 | 37 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<ll, ll> Pll;
typedef pair<int, Pii> P1;
#define rep(i, n) for (int i = 0; i < n; i++)
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define lb(vec, ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<ll, ll> Pll;
typedef pair<int, Pii> P1;
#define rep(i, n) for (int i = 0; i < n; i++)
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define lb(vec, ... | replace | 25 | 42 | 25 | 33 | TLE | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> P(M), Y(M);
for (int i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
P[i]--;
}
vector<vector<int>> vals(N);
for (int i = 0; i < M; i++) {
vals[P[i]].push_back(Y[i]);... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> P(M), Y(M);
for (int i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
P[i]--;
}
vector<vector<int>> vals(N);
for (int i = 0; i < M; i++) {
vals[P[i]].push_back(Y[i]);... | replace | 22 | 23 | 22 | 23 | -11 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string.h>
#include <vector>
typedef long long ll;
using namespace std;
ll Mod = 1e9 + 7;
int main() {
int N, M;
vector<int> tmp[N + 1];
int P[100000], Y[100000];
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
tmp... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string.h>
#include <vector>
typedef long long ll;
using namespace std;
ll Mod = 1e9 + 7;
int main() {
int N, M;
vector<int> tmp[100001];
int P[100000], Y[100000];
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
tm... | replace | 12 | 13 | 12 | 13 | -11 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vec... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vec... | replace | 54 | 55 | 54 | 55 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p03221 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define REP(i, n) for (int i = 1; i < (int)(n); ++i)
using namespace std;
int digit(int x) {
int ans = 0;
while (x > 0) {
++ans;
x /= 10;
}
return ans;
}
int main() {
in... | #include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define REP(i, n) for (int i = 1; i < (int)(n); ++i)
using namespace std;
int digit(int x) {
int ans = 0;
while (x > 0) {
++ans;
x /= 10;
}
return ans;
}
int main() {
in... | replace | 20 | 21 | 20 | 21 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
using ll = int64_t;
#define rep(i, n) for (int i = 0; i < ((int)(n)); i++) // 0-indexed昇順
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
std::cout << std::fixed << std::setprecision(15);
int N, M;
scanf("%d%d", &N, ... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
using ll = int64_t;
#define rep(i, n) for (int i = 0; i < ((int)(n)); i++) // 0-indexed昇順
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
std::cout << std::fixed << std::setprecision(15);
int N, M;
scanf("%d%d", &N, ... | replace | 26 | 27 | 26 | 27 | TLE | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
int N, M;
cin >> N >> M;
vector<int> P(N + 1), city(N + 1);
vector<vector<int>> Ms(N + 1, vector<int>());
for (int i = 1; i <= M; i++) {
int x, y;
cin >> x >> y;
P[i] ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
int N, M;
cin >> N >> M;
vector<int> P(M + 1), city(M + 1);
vector<vector<int>> Ms(N + 1, vector<int>());
for (int i = 1; i <= M; i++) {
int x, y;
cin >> x >> y;
P[i] ... | replace | 8 | 9 | 8 | 9 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
bool cmp(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
int output(int i) {
if (i < 10) {
cout << "00000" << i;
} else if (i < 100) {
cout << "0000" ... | #include <algorithm>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
bool cmp(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
int output(int i) {
if (i < 10) {
cout << "00000" << i;
} else if (i < 100) {
cout << "0000" ... | replace | 30 | 32 | 30 | 32 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <type_traits>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define drrep(i, n) for (int i = n; i > 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#... | #include <bits/stdc++.h>
#include <type_traits>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define drrep(i, n) for (int i = n; i > 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#... | replace | 58 | 59 | 58 | 59 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long int i = 0; i < n; ++i)
typedef long long int ll;
string encode(int i) {
string num = to_string(i);
while (num.size() < 6) {
num = '0' + num;
}
return num;
}
int main() {
int n, m;
cin >> n >> m;
vector<pair<int, int>> s(... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long int i = 0; i < n; ++i)
typedef long long int ll;
string encode(int i) {
string num = to_string(i);
while (num.size() < 6) {
num = '0' + num;
}
return num;
}
int main() {
int n, m;
cin >> n >> m;
vector<pair<int, int>> s(... | replace | 24 | 25 | 24 | 25 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#inclu... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#inclu... | replace | 76 | 77 | 76 | 77 | -11 | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;
int main() {
int N, M;
ci... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;
int main() {
int N, M;
ci... | replace | 25 | 26 | 25 | 27 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define p(s) std::cout << s;
#define pl(s) std::cout << s << endl;
#define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl;
#define YES(j) cout << (j ? "YES" : "NO") << endl... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define p(s) std::cout << s;
#define pl(s) std::cout << s << endl;
#define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl;
#define YES(j) cout << (j ? "YES" : "NO") << endl... | replace | 41 | 42 | 41 | 42 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
int n, m;
cin >> n >> m;
vector<pair<int, int>> city(m);
vector<vector<int>> a(n);
for (int i = 0; i < m; i++) {
int p, y;
cin >> p >> y;
city[i].first = p;
city[i].second = y;
a[p - 1].push_back(y);
}
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
int n, m;
cin >> n >> m;
vector<pair<int, int>> city(m);
vector<vector<int>> a(n);
for (int i = 0; i < m; i++) {
int p, y;
cin >> p >> y;
city[i].first = p;
city[i].second = y;
a[p - 1].push_back(y);
}
... | replace | 20 | 26 | 20 | 30 | TLE | |
p03221 | C++ | Runtime Error | #define FOR(i, begin, end) for (int i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define SORT(a) sort(a.begin(), a.end())
#define SORTD(a) sort(a.rbegin(), a.rend());
#define ll long long
#define INF 1000000000000000000
#define INT_MAX 2147483647
#include <algorithm>
#include <cmath>
#include <iomanip>
... | #define FOR(i, begin, end) for (int i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define SORT(a) sort(a.begin(), a.end())
#define SORTD(a) sort(a.rbegin(), a.rend());
#define ll long long
#define INF 1000000000000000000
#define INT_MAX 2147483647
#include <algorithm>
#include <cmath>
#include <iomanip>
... | replace | 33 | 34 | 33 | 34 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#defi... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#defi... | replace | 61 | 62 | 61 | 62 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
int *P, *Y;
std::vector<int> *yd;
cin >> N >> M;
yd = new std::vector<int>[N];
P = new int[M];
Y = new int[M];
for (int i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
yd[P[i] - 1].push_back(Y[i])... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
int *P, *Y;
std::vector<int> *yd;
cin >> N >> M;
yd = new std::vector<int>[N];
P = new int[M];
Y = new int[M];
for (int i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
yd[P[i] - 1].push_back(Y[i])... | replace | 25 | 32 | 25 | 29 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <cctype>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) (v).begin(), (v).end()
typedef long long int ll;
#define pi 3.1415926535897932384
#define E9 1000000000
#define eps 1e-4
#define pii pair<int, int>
int main() {
int N, M;
cin >> N >> M;
... | #include <bits/stdc++.h>
#include <cctype>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) (v).begin(), (v).end()
typedef long long int ll;
#define pi 3.1415926535897932384
#define E9 1000000000
#define eps 1e-4
#define pii pair<int, int>
int main() {
int N, M;
cin >> N >> M;
... | replace | 22 | 23 | 22 | 25 | TLE | |
p03221 | C++ | Runtime Error | // ref: https://drken1215.hatenablog.com/entry/2019/03/21/234900
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef int64_t int64;
typedef uint32_t uint;
typedef uint64_t uint64;
//---
template <typename T> inline void print(const T &rhs) {
std::cout << " = " << rhs << std::endl;
}
tem... | // ref: https://drken1215.hatenablog.com/entry/2019/03/21/234900
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef int64_t int64;
typedef uint32_t uint;
typedef uint64_t uint64;
//---
template <typename T> inline void print(const T &rhs) {
std::cout << " = " << rhs << std::endl;
}
tem... | replace | 69 | 70 | 69 | 70 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
void solve() {
int N, M;
cin >> N >> M;
vector<int> P(M), Y(M);
vector<vector<int>> yd(M + 1, vector<int>(0));
for (int i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
yd[P[i]].push_back(Y[i]);
}
for (int i = 0; i < N; i++) {
sort(yd[i + 1].begin(), yd... | #include <bits/stdc++.h>
using namespace std;
void solve() {
int N, M;
cin >> N >> M;
vector<int> P(M), Y(M);
vector<vector<int>> yd(N + 1, vector<int>(0));
for (int i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
yd[P[i]].push_back(Y[i]);
}
for (int i = 0; i < N; i++) {
sort(yd[i + 1].begin(), yd... | replace | 8 | 9 | 8 | 9 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int p[maxn], y[maxn];
vector<int> a[maxn];
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 0; i < m; i++) {
scanf("%d%d", &p[i], &y[i]);
a[p[i]].push_back(y[i]);
sort(a[p[i]].begin(), a[p[i]].end());
}
for (int i = ... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int p[maxn], y[maxn];
vector<int> a[maxn];
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 0; i < m; i++) {
scanf("%d%d", &p[i], &y[i]);
a[p[i]].push_back(y[i]);
}
for (int i = 1; i <= n; i++) {
if (a[i].size() > 0)... | replace | 11 | 12 | 11 | 15 | TLE | |
p03221 | C++ | Runtime Error | /*
-ensure correct output format
-ensure printing required output
-reread the problem statement
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<ll, pair<ll, ll>> plll;
#define fastread() (ios_base::sync_with_std... | /*
-ensure correct output format
-ensure printing required output
-reread the problem statement
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<ll, pair<ll, ll>> plll;
#define fastread() (ios_base::sync_with_std... | replace | 68 | 69 | 68 | 69 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
typedef unsigned int uint;
using namespace std;
int main() {
int N, M;
cin >> N >> M;
pair<pai... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
typedef unsigned int uint;
using namespace std;
int main() {
int N, M;
cin >> N >> M;
pair<pai... | replace | 19 | 20 | 19 | 20 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
#define FOR(i, begin, end) for (int i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (int i = (end)-1; i >= (begin); i--)
#define IREP(i, n) IFOR(i, 0, n)
#define SORT(a) sort(a.begin(), a.end())
#define REVERSE(a) reverse(a.begin(), a.end())
#define L... | #include <bits/stdc++.h>
#define FOR(i, begin, end) for (int i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (int i = (end)-1; i >= (begin); i--)
#define IREP(i, n) IFOR(i, 0, n)
#define SORT(a) sort(a.begin(), a.end())
#define REVERSE(a) reverse(a.begin(), a.end())
#define L... | replace | 42 | 43 | 42 | 43 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <chrono>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
int main(int argc, const char *argv[]) {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
v... | #include <algorithm>
#include <chrono>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
int main(int argc, const char *argv[]) {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
v... | delete | 33 | 36 | 33 | 33 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, m;
cin >> n >> m;
ll p[m], y[m];
vector<ll> py[m * 2];
for (int i = 0; i < m; i++)
cin >> p[i] >> y[i];
for (int i = 0; i < m; i++)
py[p[i]].push_back(y[i]);
for (int i = 0; i < n; i++)
sort(py[i + 1].begin... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, m;
cin >> n >> m;
ll p[m], y[m];
vector<ll> py[n + 1];
for (int i = 0; i < m; i++)
cin >> p[i] >> y[i];
for (int i = 0; i < m; i++)
py[p[i]].push_back(y[i]);
for (int i = 0; i < n; i++)
sort(py[i + 1].begin... | replace | 7 | 8 | 7 | 8 | 0 | |
p03221 | C++ | Runtime Error |
#include <algorithm>
#include <iostream>
#include <random>
#include <string>
#include <vector>
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
#define NNN (10000)
#define MMM (10000)
void funcC() {
int N;
int M;
std::vector<int> A[NNN + 1];
int P[NNN];
int Y[NNN];
cin >> N;
cin >> M... |
#include <algorithm>
#include <iostream>
#include <random>
#include <string>
#include <vector>
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
#define NNN (100000)
#define MMM (10000)
void funcC() {
int N;
int M;
std::vector<int> A[NNN + 1];
int P[NNN];
int Y[NNN];
cin >> N;
cin >> ... | replace | 12 | 13 | 12 | 13 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#pragma comment(linker, "/stck:1024000000,102400... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#pragma comment(linker, "/stck:1024000000,102400... | replace | 44 | 46 | 44 | 46 | TLE | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> yd(n + 1);
vector<int> p(n);
vector<int> y(n);
for (int i = 0; i < m; i++) {
cin >> p[i] >> y[i];
yd[p[i]].push_back(y[i]);
}
for (int i = 0; i < n; i++) {
sort(yd[i + 1].begin(), yd[i + ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> yd(n + 1);
vector<int> p(m);
vector<int> y(m);
for (int i = 0; i < m; i++) {
cin >> p[i] >> y[i];
yd[p[i]].push_back(y[i]);
}
for (int i = 0; i < n; i++) {
sort(yd[i + 1].begin(), yd[i + ... | replace | 6 | 8 | 6 | 8 | 0 | |
p03221 | C++ | Time Limit Exceeded | #pragma GCC optimize( \
"O3,Ofast,inline,fast-math,unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int int64_t
#define double long double
#define INIT ... | #pragma GCC optimize( \
"O3,Ofast,inline,fast-math,unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int int64_t
#define double long double
#define INIT ... | replace | 2,132 | 2,133 | 2,132 | 2,134 | TLE | |
p03221 | C++ | Time Limit Exceeded | #pragma GCC optimize( \
"O3,Ofast,inline,fast-math,unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int int64_t
#define double long double
#define INIT ... | #pragma GCC optimize( \
"O3,Ofast,inline,fast-math,unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int int64_t
#define double long double
#define INIT ... | replace | 2,139 | 2,140 | 2,139 | 2,140 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> P(M);
vector<int> Y(M);
map<int, vector<int>> PY;
for (auto i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
if (PY.find(P[i]) == PY.end()) ... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> P(M);
vector<int> Y(M);
map<int, vector<int>> PY;
for (auto i = 0; i < M; i++) {
cin >> P[i] >> Y[i];
if (PY.find(P[i]) == PY.end()) ... | replace | 30 | 31 | 30 | 32 | TLE | |
p03221 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
#define repl(i, l, r) for (ll i = l; i < r; i++)
#define rep(i, n) repl(i, 0, n)
using namespac... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
#define repl(i, l, r) for (ll i = l; i < r; i++)
#define rep(i, n) repl(i, 0, n)
using namespac... | replace | 53 | 54 | 53 | 54 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> p(n), y(n);
for (int i = 0; i < m; i++)
cin >> p[i] >> y[i];
vector<vector<int>> cor(n + 1); // cor[p[i]] = 県p[i]に属する市の誕生年の配列
for (int i = 0; i < m; i++)
cor[p[i]].push_back(y[i]);... | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> p(m), y(m);
for (int i = 0; i < m; i++)
cin >> p[i] >> y[i];
vector<vector<int>> cor(n + 1); // cor[p[i]] = 県p[i]に属する市の誕生年の配列
for (int i = 0; i < m; i++)
cor[p[i]].push_back(y[i]);... | replace | 7 | 8 | 7 | 8 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
string add0(int X) {
string S = to_string(X);
while (S.size() < 6) {
S = '0' + S;
}
return S;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
vector<int> P(M), Y(M);
ve... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
string add0(int X) {
string S = to_string(X);
while (S.size() < 6) {
S = '0' + S;
}
return S;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
vector<int> P(M), Y(M);
ve... | replace | 29 | 30 | 29 | 30 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RREP(i, n) for (int i ... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RREP(i, n) for (int i ... | replace | 60 | 61 | 60 | 61 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
void solve() {
int n, m;
cin >> n >> m;
unordered_map<int, vector<int>> mp;
vector<pair<int, int>> a(m);
for (int i = 0; i < m; i++) {
int p, y;
cin >> p >> y;
mp[p].push_back(y);
a[i].first = p;
a[i].second = y;
}
for (auto t = mp.begin()... | #include <bits/stdc++.h>
using namespace std;
void solve() {
int n, m;
cin >> n >> m;
unordered_map<int, vector<int>> mp;
vector<pair<int, int>> a(m);
for (int i = 0; i < m; i++) {
int p, y;
cin >> p >> y;
mp[p].push_back(y);
a[i].first = p;
a[i].second = y;
}
for (auto t = mp.begin()... | replace | 21 | 44 | 21 | 24 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef int64_t ll;
const ll INF = 1000000000000000000;
#define for... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef int64_t ll;
const ll INF = 1000000000000000000;
#define for... | replace | 35 | 39 | 35 | 50 | TLE | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <list>
#include <stdio.h>
#include <utility>
#include <vector>
using namespace std;
struct City {
int y;
int p;
int n;
};
int main() {
vector<City> city;
int N, M;
cin >> N >> M;
for (int i = 0; i < M; i++) {
int p, y;
City tmp;
cin >> p >... | #include <algorithm>
#include <iostream>
#include <list>
#include <stdio.h>
#include <utility>
#include <vector>
using namespace std;
struct City {
int y;
int p;
int n;
};
int main() {
vector<City> city;
int N, M;
cin >> N >> M;
for (int i = 0; i < M; i++) {
int p, y;
City tmp;
cin >> p >... | replace | 34 | 43 | 34 | 38 | TLE | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <string>
using namespace std;
struct ci {
int order;
int p;
int y;
bool operator<(const ci &another) const {
return y < another.y; // 年齢を比較
};
int id;
};
bool cmp(const ci &a, const ci &b) { return a.order < b.order... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <string>
using namespace std;
struct ci {
int order;
int p;
int y;
bool operator<(const ci &another) const {
return y < another.y; // 年齢を比較
};
int id;
};
bool cmp(const ci &a, const ci &b) { return a.order < b.order... | replace | 18 | 20 | 18 | 20 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> v(n);
vector<pair<int, int>> per(n);
rep(i, m) {
int x,... | #include <algorithm>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> v(n);
vector<pair<int, int>> per(m);
rep(i, m) {
int x,... | replace | 13 | 14 | 13 | 14 | 0 | |
p03221 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
using ll = long long;
using namespace std;
void solve() {
int n, m;
cin >> n >> m;
vector<int> pre[10000];
int p[10000], y[10000];
for (int i = 0; i < m; i++)
cin >> p[i] >> y[i], pre[p[i]].push_back(y[i]);
fo... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
using ll = long long;
using namespace std;
void solve() {
int n, m;
cin >> n >> m;
vector<int> pre[100001];
int p[100000], y[100000];
for (int i = 0; i < m; i++)
cin >> p[i] >> y[i], pre[p[i]].push_back(y[i]);
... | replace | 11 | 13 | 11 | 13 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
#define repi(i, a, b) for (ll i = a; i < b; i++)
#define rep(i, a) repi(i, 0... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
#define repi(i, a, b) for (ll i = a; i < b; i++)
#define rep(i, a) repi(i, 0... | replace | 54 | 60 | 54 | 55 | TLE | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
typedef pair<int, int> pint;
int main() {
int N, M;
cin >> N >> M;
vector<pair<pint, ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
typedef pair<int, int> pint;
int main() {
int N, M;
cin >> N >> M;
vector<pair<pint, ... | replace | 31 | 32 | 31 | 32 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<VVI> VVVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef priority_queue<int> PQ_DESC;
typedef priority_queue<int, vector<int>, greater<int>> PQ_A... | #include "bits/stdc++.h"
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<VVI> VVVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef priority_queue<int> PQ_DESC;
typedef priority_queue<int, vector<int>, greater<int>> PQ_A... | replace | 147 | 154 | 147 | 151 | TLE | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int INF = 1e9;
int main() {
ll n, m;
cin >> n >> m;
vector<ll> p(m), y(m);
vector<vector<ll>> yd(n + 1);
rep(i, m) cin >> p[i] >> y[i], yd[p[i]].push_back(y[i]);
rep(i, n) sort(yd[p[i... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int INF = 1e9;
int main() {
ll n, m;
cin >> n >> m;
vector<ll> p(m), y(m);
vector<vector<ll>> yd(n + 1);
rep(i, m) cin >> p[i] >> y[i], yd[p[i]].push_back(y[i]);
rep(i, n) sort(yd[i +... | replace | 14 | 15 | 14 | 15 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<pair<int, int>> hoge(m);
map<int, vector<int>> fuga;
for (int i = 0; i < m; i++) {
cin >> hoge.at(i).first >> hoge.at(i).second;
fuga[hoge.at(i).first].push_back(hoge.at(... | #include <bits/stdc++.h>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<pair<int, int>> hoge(m);
map<int, vector<int>> fuga;
for (int i = 0; i < m; i++) {
cin >> hoge.at(i).first >> hoge.at(i).second;
fuga[hoge.at(i).first].push_back(hoge.at(... | replace | 17 | 19 | 17 | 19 | TLE | |
p03221 | 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<vector<int>> vec(100010, vector<int>());
vector<P> ve(m);
rep(i, m) {
int p, y;
scanf("%d%d", &p, &y);
ve[i].f... | #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<vector<int>> vec(100010, vector<int>());
vector<P> ve(m);
rep(i, m) {
int p, y;
scanf("%d%d", &p, &y);
ve[i].f... | replace | 19 | 30 | 19 | 25 | TLE | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
using namespace std;
using Int = long long;
Int INF = 1LL << 60;
const Int MOD = 1000000007;
struct city {
Int pr... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
using namespace std;
using Int = long long;
Int INF = 1LL << 60;
const Int MOD = 1000000007;
struct city {
Int pr... | replace | 42 | 43 | 42 | 43 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, n) for (int i = 0; i ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, n) for (int i = 0; i ... | replace | 35 | 42 | 35 | 38 | TLE | |
p03221 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define sp(x) cout << setprecision(x);
#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 inf 10000000
#define linf INT64_MAX * 0.99
typedef long long ll;
typedef pair<int, int> P;
int main()... | #include "bits/stdc++.h"
using namespace std;
#define sp(x) cout << setprecision(x);
#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 inf 10000000
#define linf INT64_MAX * 0.99
typedef long long ll;
typedef pair<int, int> P;
int main()... | replace | 19 | 20 | 19 | 20 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <tupl... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <tupl... | replace | 44 | 45 | 44 | 45 | TLE | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cmath>
const double PI = 3.14159265358979323846;
// using namespace boost::multiprecision;
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<ll, ll> P;
const ll INF = 1e15;
#define cmin(x, y) x = min(x, y)... | #include <bits/stdc++.h>
#include <cmath>
const double PI = 3.14159265358979323846;
// using namespace boost::multiprecision;
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<ll, ll> P;
const ll INF = 1e15;
#define cmin(x, y) x = min(x, y)... | replace | 57 | 58 | 57 | 58 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int inum(int N, int W) { return N / W; }
int jnum(int N, int W) {
if ((N / W) % 2)
return N % W;
else
return W - (N % W) - 1;
}
... | #include <bits/stdc++.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int inum(int N, int W) { return N / W; }
int jnum(int N, int W) {
if ((N / W) % 2)
return N % W;
else
return W - (N % W) - 1;
}
... | replace | 19 | 20 | 19 | 20 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
scanf("%d%d", &N, &M);
vector<tuple<int, int, int>> pref_year_id(M);
for (int i = 0; i < M; i++) {
int pid, year;
scanf("%d%d", &pid, &year);
pref_year_id.at(i) = make_tuple(pid, year, i);
}
sort(pref_year_id.begin(), pref_y... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
scanf("%d%d", &N, &M);
vector<tuple<int, int, int>> pref_year_id(M);
for (int i = 0; i < M; i++) {
int pid, year;
scanf("%d%d", &pid, &year);
pref_year_id.at(i) = make_tuple(pid, year, i);
}
sort(pref_year_id.begin(), pref_y... | replace | 16 | 18 | 16 | 18 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct city {
int id1;
int id2;
int year;
int num;
};
city cities[10002];
bool cmp1(city a, city b) {
if (a.id1 != b.id1) {
return a.id1 < b.id1;
} else {
return a.year < b.year;
}
}
bool cmp2(city a, city b) { return a.num < b.num; }
void add0(int a) ... | #include <bits/stdc++.h>
using namespace std;
struct city {
int id1;
int id2;
int year;
int num;
};
city cities[100002];
bool cmp1(city a, city b) {
if (a.id1 != b.id1) {
return a.id1 < b.id1;
} else {
return a.year < b.year;
}
}
bool cmp2(city a, city b) { return a.num < b.num; }
void add0(int a)... | replace | 8 | 9 | 8 | 9 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <stdio.h>
int main(void) {
int n, m;
scanf("%lld%lld", &n, &m);
unsigned long long p[m], y[m];
unsigned long long x[m];
for (int i = 0; i < m; i++) {
scanf("%lu%lu", &p[i], &y[i]);
x[i] = (p[i] << 47) + (y[i] << 17) + i;
}
std::sort(x, x + m);
int c = 1;
y[(x[0] <... | #include <algorithm>
#include <stdio.h>
int main(void) {
int n, m;
scanf("%d%d", &n, &m);
unsigned long long p[m], y[m];
unsigned long long x[m];
for (int i = 0; i < m; i++) {
scanf("%lu%lu", &p[i], &y[i]);
x[i] = (p[i] << 47) + (y[i] << 17) + i;
}
std::sort(x, x + m);
int c = 1;
y[(x[0] << 47... | replace | 4 | 5 | 4 | 5 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
// #define INF 100000000
// #define MOD (int) (1e9+7)
#define rep(i, a) for (int i = 0; i < (a); i++)
using namespace std;
const ... | #include <algorithm>
#include <complex>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
// #define INF 100000000
// #define MOD (int) (1e9+7)
#define rep(i, a) for (int i = 0; i < (a); i++)
using namespace std;
const ... | replace | 22 | 23 | 22 | 23 | 0 | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<pair<int, int>> p(M);
for (int i = 0; i < M; i++) {
int P, Y;
cin >> P >> Y;
P--;
p.at(i) = make_pair(Y, P);
}
vector<vector<int>> vals(N);
for (int i = 0; i < M; i++)
vals.at(p.at(i).second).... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<pair<int, int>> p(M);
for (int i = 0; i < M; i++) {
int P, Y;
cin >> P >> Y;
P--;
p.at(i) = make_pair(Y, P);
}
vector<vector<int>> vals(N);
for (int i = 0; i < M; i++)
vals.at(p.at(i).second).... | replace | 26 | 27 | 26 | 27 | 0 | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
struct city {
int p;
int y;
int bian1;
int bian2;
} c[10005];
bool cmp1(city a, city b) {
if (a.p != b.p) {
return a.p < b.p;
} else {
return a.y < b.y;
}
}
bool cmp2(city a, city b) { return a.bian1 < b.bian1; }
int main() {
int n, m... | #include <algorithm>
#include <iostream>
using namespace std;
struct city {
int p;
int y;
int bian1;
int bian2;
} c[100005];
bool cmp1(city a, city b) {
if (a.p != b.p) {
return a.p < b.p;
} else {
return a.y < b.y;
}
}
bool cmp2(city a, city b) { return a.bian1 < b.bian1; }
int main() {
int n, ... | replace | 8 | 9 | 8 | 9 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> p(m);
vector<int> y(m);
vector<int> py[100001];
for (int i = 0; i < m; i++) {
cin >> p[i] >> y[i];
py[p[i]].push_back(y[i]);
}
for (int i = 0; i < m; i++) {
sort(py[p[i]].begin(), py[p[i]].end());... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> p(m);
vector<int> y(m);
vector<int> py[100001];
for (int i = 0; i < m; i++) {
cin >> p[i] >> y[i];
py[p[i]].push_back(y[i]);
}
for (int i = 0; i < n; i++) {
sort(py[i + 1].begin(), py[i + 1].end()... | replace | 12 | 14 | 12 | 14 | TLE | |
p03221 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int answer[100005], preI[100005];
int main() {
int n, m, an, pr;
cin >> n >> m;
pair<int, pair<int, int>> v[n + 10];
for (int i = 0; i < m; i++) {
cin >> pr >> an;
v[i].second.first = an;
v[i].first = pr;
v[i].sec... | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int answer[100005], preI[100005];
int main() {
int n, m, an, pr;
cin >> n >> m;
pair<int, pair<int, int>> v[m + 10];
for (int i = 0; i < m; i++) {
cin >> pr >> an;
v[i].second.first = an;
v[i].first = pr;
v[i].sec... | replace | 10 | 11 | 10 | 11 | 0 | |
p03221 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#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 SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long... | #include <bits/stdc++.h>
#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 SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long... | replace | 35 | 37 | 35 | 36 | TLE | |
p03221 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
int N, M;
cin >> N >> M;
vector<tuple<int, int, int>> cities(M);
vector<tuple<int, int>> cities_id(M);
for (int i = 0; i < M; i++) {
int P, Y;
cin >> P >> Y;
cities[i] = make_tuple(Y, P, i);
}
sort(cities.beg... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
int N, M;
cin >> N >> M;
vector<tuple<int, int, int>> cities(M);
vector<tuple<int, int>> cities_id(M);
for (int i = 0; i < M; i++) {
int P, Y;
cin >> P >> Y;
cities[i] = make_tuple(Y, P, i);
}
sort(cities.beg... | replace | 16 | 17 | 16 | 17 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.