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
p02924
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <climits> #include <cmath> #include <iomanip> #include <math.h> #include <type_traits> #include <unordered_map> #include <unordered_set> // #define local #ifdef local #include "dbg-macro/dbg.h" #endif // #define hacks #ifdef hacks #include <boost/multiprecision/cpp_int.hpp> #endif #def...
#include <bits/stdc++.h> #include <climits> #include <cmath> #include <iomanip> #include <math.h> #include <type_traits> #include <unordered_map> #include <unordered_set> // #define local #ifdef local #include "dbg-macro/dbg.h" #endif // #define hacks #ifdef hacks #include <boost/multiprecision/cpp_int.hpp> #endif #def...
replace
39
44
39
40
TLE
p02924
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const double pi = 3.14159265358979323846; #define rep(i, n) for (ll i = 0; i < n; i++) #define mod 1000000007LL #define PS(p) cout << setprecision(15) << fixed << p << endl; #define UNIQUE(v) v.erase(std::unique(v.begin(), v.end()), v.end()); #defi...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const double pi = 3.14159265358979323846; #define rep(i, n) for (ll i = 0; i < n; i++) #define mod 1000000007LL #define PS(p) cout << setprecision(15) << fixed << p << endl; #define UNIQUE(v) v.erase(std::unique(v.begin(), v.end()), v.end()); #defi...
replace
20
30
20
21
TLE
p02924
C++
Runtime Error
#include <algorithm> #include <array> #include <cmath> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <set> #include <sstream> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace ...
#include <algorithm> #include <array> #include <cmath> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <set> #include <sstream> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace ...
replace
141
146
141
142
0
p02924
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); long long n, sum = 0, tmp; cin >> n; for (int i = 1; i < n; i++) { tmp = i % (i + 1); sum += tmp; } cout << sum << '\n'; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); long long n, sum = 0, tmp; cin >> n; for (int i = 1; i < n; i++) { sum += i; } cout << sum << '\n'; }
replace
9
11
9
10
TLE
p02924
C++
Time Limit Exceeded
#include <algorithm> #include <cfloat> #include <cmath> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <set> #include <stdio.h> #include <string> #include <vector> using namespace std; const double PI = acos(-1); int main() { long n; cin >> n; long ans = 0; for (int i = 1; ...
#include <algorithm> #include <cfloat> #include <cmath> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <set> #include <stdio.h> #include <string> #include <vector> using namespace std; const double PI = acos(-1); int main() { long n; cin >> n; long ans = n * (n - 1) / 2; co...
replace
18
23
18
19
TLE
p02924
C++
Runtime Error
/* vrrtll==???>;::::~~~~~~......`.`````````````````````...-?777!_.._?7u,~~~::::;>>??=lllttrrzu rtll==??>>;::::~~~~......`.`````````````````` ..J77!`````````...`..._T,~~~~:::;;>??==lttrrv tll=??>>;:::~~~~......``````````````````..J7^ ` `` ` `` .,```````...._4,.~~~::;;>>?===lttr l=???>;;::~~~......`````HTSu,.`` `..J7! ...
/* vrrtll==???>;::::~~~~~~......`.`````````````````````...-?777!_.._?7u,~~~::::;>>??=lllttrrzu rtll==??>>;::::~~~~......`.`````````````````` ..J77!`````````...`..._T,~~~~:::;;>??==lttrrv tll=??>>;:::~~~~......``````````````````..J7^ ` `` ` `` .,```````...._4,.~~~::;;>>?===lttr l=???>;;::~~~......`````HTSu,.`` `..J7! ...
replace
180
187
180
181
0
p02924
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; const ll INF = 1LL << 60; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return ...
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; const ll INF = 1LL << 60; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return ...
replace
25
27
25
26
TLE
p02924
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { long long n; cin >> n; long long ans = 0; for (int i = 1; i <= n; i++) { if (i == n) ans += i % 1; else ans += i % (i + 1); } cout << ans << endl; return 0; }
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { long long n; cin >> n; long long ans = n * (n - 1) / 2; cout << ans << endl; return 0; }
replace
10
17
10
11
TLE
p02924
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define fi first #define se second #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 srep(i, s, t) for (int i = s; i < t; ++i) #define rng(a) a.begin(), a.end() #define rrng(a) a.rbegin()...
#include <bits/stdc++.h> #define fi first #define se second #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 srep(i, s, t) for (int i = s; i < t; ++i) #define rng(a) a.begin(), a.end() #define rrng(a) a.rbegin()...
replace
42
49
42
45
TLE
p02924
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <math.h> #include <stdlib.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) inline constexpr ll gcd(ll a, ll b) { if (!a || !b) return 0; while (b) { ll c = b; b = a % b; a = c; } return a; } inline constexpr ll l...
#include <bits/stdc++.h> #include <math.h> #include <stdlib.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) inline constexpr ll gcd(ll a, ll b) { if (!a || !b) return 0; while (b) { ll c = b; b = a % b; a = c; } return a; } inline constexpr ll l...
replace
24
27
24
25
TLE
p02924
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define ALL(a) (a).begin(), (a).end() #define MOD 1000000007 int main() { int N; cin >> N; long long int sum = 0; for (int i = N; i > 1; i--) { sum += (i - 1 % i); // if(i == 1) sum += N % i; } if (N == 1) ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define ALL(a) (a).begin(), (a).end() #define MOD 1000000007 int main() { int N; cin >> N; long long int sum = 0; for (int i = N; i > 1; i--) sum += i - 1; if (N == 1) cout << 0; else cout << sum; }
replace
10
14
10
12
TLE
p02924
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define lli long long int #define MODV 1000000007 #define INF INT_MAX // 2147483647 #define INFLL LLONG_MAX // 9223372036854775807 #define rep(i, n) for (lli i = 0, i##_len = (lli)(n); i < i##_len; i++) #define repf(i, n) for (lli i = 1, i##_len = (lli)(n + 1); i < i##_len; i++) #define per...
#include <bits/stdc++.h> #define lli long long int #define MODV 1000000007 #define INF INT_MAX // 2147483647 #define INFLL LLONG_MAX // 9223372036854775807 #define rep(i, n) for (lli i = 0, i##_len = (lli)(n); i < i##_len; i++) #define repf(i, n) for (lli i = 1, i##_len = (lli)(n + 1); i < i##_len; i++) #define per...
replace
39
42
39
40
TLE
p02924
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <iostream> using namespace std; #define ll long long int main() { ll sum = 0, ans = -1; ll n; cin >> n; for (ll i = 1; i <= n; i++) { sum += (i % n); } std::cout << sum << std::endl; return 0; }
#include <bits/stdc++.h> #include <iostream> using namespace std; #define ll long long int main() { ll sum = 0, ans = -1; ll n; cin >> n; n--; sum = (n * (n + 1)) / 2; std::cout << sum << std::endl; return 0; }
replace
10
13
10
12
TLE
p02924
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <numeric> #include <string> #include <vector> // #include <stdio.h> // #include <stack> // #include <queue> // #include <cstdio> #include <cmath> #include <fstream> #include <iterator> #include <map> // #include <list> #include <iomanip> // #include <stdlib.h> // #inclu...
#include <algorithm> #include <iostream> #include <numeric> #include <string> #include <vector> // #include <stdio.h> // #include <stack> // #include <queue> // #include <cstdio> #include <cmath> #include <fstream> #include <iterator> #include <map> // #include <list> #include <iomanip> // #include <stdlib.h> // #inclu...
replace
127
134
127
129
TLE
p02924
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll N; cin >> N; vector<ll> P(N); vector<ll> M(N); if (N == 1) { cout << 0 << endl; return 0; } ll ans = N * (N - 1) / 2; cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll N; cin >> N; if (N == 1) { cout << 0 << endl; return 0; } ll ans = N * (N - 1) / 2; cout << ans << endl; return 0; }
delete
8
11
8
8
0
p02924
Python
Time Limit Exceeded
# -*- coding: utf-8 -*- n = int(input()) tmp = [i for i in range(1, n + 1)] print(sum(tmp) - n)
# -*- coding: utf-8 -*- n = int(input()) su = n * (n + 1) // 2 print(su - n)
replace
3
5
3
5
TLE
p02925
C++
Time Limit Exceeded
#include <algorithm> #include <chrono> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <time.h> #include <tuple> #include <unordered...
#include <algorithm> #include <chrono> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <time.h> #include <tuple> #include <unordered...
replace
58
60
58
60
TLE
p02925
C++
Runtime Error
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define sbits(a) _...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define sbits(a) _...
replace
64
65
64
65
0
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define _MACRO(_1, _2, _3, NAME, ...) NAME #define _repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define _rep(i, n) _repl(i, 0, n) #define rep(...) _MACRO(__VA_ARGS__, _repl, _rep)(__VA_ARGS__) #define pb push_back #define all(x) begin(x), end(x) #define uniq(x) ...
#include <bits/stdc++.h> using namespace std; #define _MACRO(_1, _2, _3, NAME, ...) NAME #define _repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define _rep(i, n) _repl(i, 0, n) #define rep(...) _MACRO(__VA_ARGS__, _repl, _rep)(__VA_ARGS__) #define pb push_back #define all(x) begin(x), end(x) #define uniq(x) ...
replace
82
83
82
86
0
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; ++i) #define ALL(a) (a).begin(), (a).end() #define rALL(a) (a).rbegin(), (a).rend() #define SZ(x) ((int)(x).size()) using ll = long long; using P = pair<ll, ll>; using llP = pair<ll, ll>; using DoP = pair<double, double>; const int ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; ++i) #define ALL(a) (a).begin(), (a).end() #define rALL(a) (a).rbegin(), (a).rend() #define SZ(x) ((int)(x).size()) using ll = long long; using P = pair<ll, ll>; using llP = pair<ll, ll>; using DoP = pair<double, double>; const int ...
replace
121
122
121
122
0
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> #ifdef TEST #include <mytest.h> #else #define open(...) 0 #define print(...) 42 #endif using namespace std; namespace io { const int SZ = (1 << 22) + 1; char buf[SZ], *ptr = NULL, *bnd = NULL; #define GC() \ ((ptr == bnd) ? (pt...
#include <bits/stdc++.h> #ifdef TEST #include <mytest.h> #else #define open(...) 0 #define print(...) 42 #endif using namespace std; namespace io { const int SZ = (1 << 22) + 1; char buf[SZ], *ptr = NULL, *bnd = NULL; #define GC() \ ((ptr == bnd) ? (pt...
replace
58
59
58
59
TLE
p02925
C++
Runtime Error
#include <algorithm> #include <iostream> #include <stdio.h> #include <vector> using namespace std; const int maxn = 1000 + 10; int n; int aa[maxn]; int b[maxn][maxn]; vector<int> a[maxn * maxn]; int d[maxn], deg[maxn] = {0}; int queue[maxn * maxn], front, rear; int kq; int id(int i, int j) { return b[i][j]; } int ma...
#include <algorithm> #include <iostream> #include <stdio.h> #include <vector> using namespace std; const int maxn = 1000 + 10; int n; int aa[maxn]; int b[maxn][maxn]; vector<int> a[maxn * maxn]; int d[maxn * maxn], deg[maxn * maxn] = {0}; int queue[maxn * maxn], front, rear; int kq; int id(int i, int j) { return b[i]...
replace
11
12
11
12
0
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; vector<vector<int>> a(n, vector<int>(n - 1)); for (int i = 0; i < n; i++) { for (int j = n - 2; j >= 0; j--) { int x; cin >> x; a[i][j] = x - 1; } } int TOT = n * (n - 1) / 2; set<int> now; for (int...
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; vector<vector<int>> a(n, vector<int>(n - 1)); for (int i = 0; i < n; i++) { for (int j = n - 2; j >= 0; j--) { int x; cin >> x; a[i][j] = x - 1; } } int TOT = n * (n - 1) / 2; set<int> now; for (int...
insert
45
45
45
46
TLE
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define lson rt << 1 #define rson rt << 1 | 1 #define scd(x) scanf("%d", &x) #define scdd(x, y) scanf("%d%d", &x, &y) const int maxn = 1000 + 10; typedef long long ll; typedef pair<int, int> pii; const int INF = 0x3f3f3f3f; map<pii, int> mp; int arr[maxn][maxn]; int in[maxn...
#include <bits/stdc++.h> using namespace std; #define lson rt << 1 #define rson rt << 1 | 1 #define scd(x) scanf("%d", &x) #define scdd(x, y) scanf("%d%d", &x, &y) const int maxn = 1000 + 10; typedef long long ll; typedef pair<int, int> pii; const int INF = 0x3f3f3f3f; map<pii, int> mp; int arr[maxn][maxn], in[maxn * m...
replace
11
14
11
13
0
p02925
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for (int i = (int)a, i##_len = (b); i < i##_len; i++) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) #define all(box) box.begin(), box.end() using ...
#include <bits/stdc++.h> #define int long long #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for (int i = (int)a, i##_len = (b); i < i##_len; i++) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) #define all(box) box.begin(), box.end() using ...
replace
103
105
103
105
0
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define boost \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0) #define rando ...
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define boost \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ co...
insert
0
0
0
1
TLE
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define pb push_back #define fs first #define sc second #define mk make_pair typedef long long ll; typedef long double ld; typedef pair<int, int> pii; const int INF = 1e9 + 1; const ll LINF = 1e17; const int MAKS = 1010; int n, x, day, num[MAKS][MAKS], cnt, in[MAKS * MAKS];...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define fs first #define sc second #define mk make_pair typedef long long ll; typedef long double ld; typedef pair<int, int> pii; const int INF = 1e9 + 1; const ll LINF = 1e17; const int MAKS = 1010; int n, x, day, num[MAKS][MAKS], cnt, in[MAKS * MAKS];...
replace
15
16
15
16
0
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return...
insert
140
140
140
141
0
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main(void) { long n; cin >> n; auto idx = [&](int x, int y) { int t = min(x, y); int s = max(x, y); return t * n + s; }; vector<vector<long>> a(n, vector<long>(n - 1)); for (auto &x : a) for (auto &y : x) cin >> y, y--; vector<in...
#include <bits/stdc++.h> using namespace std; int main(void) { long n; cin >> n; auto idx = [&](int x, int y) { int t = min(x, y); int s = max(x, y); return t * n + s; }; vector<vector<long>> a(n, vector<long>(n - 1)); for (auto &x : a) for (auto &y : x) cin >> y, y--; vector<in...
replace
54
55
54
55
0
p02925
C++
Time Limit Exceeded
#include <iostream> #include <queue> using namespace std; queue<int> q[1000]; int n, a, i, j; int d[1000]; int c = 0, t = 0, now, l; bool f; int main() { scanf("%d", &n); for (i = 0; i < n; i++) { for (j = 0; j < n - 1; j++) { scanf("%d", &a); q[i].push(a - 1); } d[i] = -1; } l = n * (...
#include <iostream> #include <queue> using namespace std; queue<int> q[1000]; int n, a, i, j; int d[1000]; int c = 0, t = 0, now, l; bool f; int main() { scanf("%d", &n); for (i = 0; i < n; i++) { for (j = 0; j < n - 1; j++) { scanf("%d", &a); q[i].push(a - 1); } d[i] = -1; } l = n * (...
replace
26
28
26
29
TLE
p02925
C++
Runtime Error
#include <algorithm> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <un...
#include <algorithm> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <un...
replace
60
61
60
61
0
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, e) for (int i = a; i < e; ++i) using LL = long long; struct TopologicalSort { vector<vector<int>> E; TopologicalSort(int N) { E.resize(N); } void add_edge(int a, int b) { E[a].push_back(b); } bool visit(int v, vector<int> &order, vector<int> &colo...
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, e) for (int i = a; i < e; ++i) using LL = long long; struct TopologicalSort { vector<vector<int>> E; TopologicalSort(int N) { E.resize(N); } void add_edge(int a, int b) { E[a].push_back(b); } bool visit(int v, vector<int> &order, vector<int> &colo...
replace
54
56
54
56
0
p02925
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f, maxn = 1e3 + 1; int a[maxn][maxn], nowp[maxn], vis[ma...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f, maxn = 1e3 + 50; int a[maxn][maxn], nowp[maxn], vis[m...
replace
14
15
14
15
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; vector<vector<int>> vec; vector<vector<int>> now; bool dfs(int i) { int ii = now.at(i).at(0); if (ii == -1) { return false; } if (now.at(ii).at(0) == i) { return true; } else { return false; } } int main() { int N; cin >> N; vec.resize(N, vecto...
#include <bits/stdc++.h> using namespace std; vector<vector<int>> vec; vector<vector<int>> now; bool dfs(int i) { int ii = now.at(i).at(0); if (ii == -1) { return false; } if (now.at(ii).at(0) == i) { return true; } else { return false; } } int main() { int N; cin >> N; vec.resize(N, vecto...
replace
32
34
32
34
TLE
p02925
C++
Time Limit Exceeded
/* _____ ____ _____ ___ ___ __ ___ |_ _/ __ \_ _| |__ \ / _ \/_ |/ _ \ | || | | || | ) | | | || | (_) | | || | | || | / /| | | || |\__, | _| || |__| || |_ / /_| |_| || | / / |_____\____/_____| |____|\___/ |_| /_/ */ #include <bits/stdc++.h> #define rep(i, a, b) for (int i = (a); i < (b); i...
/* _____ ____ _____ ___ ___ __ ___ |_ _/ __ \_ _| |__ \ / _ \/_ |/ _ \ | || | | || | ) | | | || | (_) | | || | | || | / /| | | || |\__, | _| || |__| || |_ / /_| |_| || | / / |_____\____/_____| |____|\___/ |_| /_/ */ #include <bits/stdc++.h> #define rep(i, a, b) for (int i = (a); i < (b); i...
insert
89
89
89
93
TLE
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define debug(n) cerr << #n << ':' << n << endl; #define rep(i, n) for (int i = 0; i < (n); i++) template <class T, class U> using umap = unordered_map<T, U>; using ll = long long; ll n; vector<vector<ll>> a; umap<ll, vector<ll>> to; int main() { const ll MAXN = 1010;...
#include <bits/stdc++.h> using namespace std; #define debug(n) cerr << #n << ':' << n << endl; #define rep(i, n) for (int i = 0; i < (n); i++) template <class T, class U> using umap = unordered_map<T, U>; using ll = long long; ll n; vector<vector<ll>> a; umap<ll, vector<ll>> to; int main() { cin >> n; const ll ...
insert
14
14
14
15
-11
p02925
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, a) for (int i = (int)0; i < (int)a; ++i) #define pb...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, a) for (int i = (int)0; i < (int)a; ++i) #define pb...
replace
24
25
24
25
0
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MOD = 1e9 + 7; const int INF = 1e9; vector<int> edge[500000]; int deg[500000]; int d[500000]; int main() { int n; cin >> n; int a[n][n - 1]; for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j++) { cin >> a[i][j]; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MOD = 1e9 + 7; const int INF = 1e9; vector<int> edge[1000000]; int deg[1000000]; int d[1000000]; int main() { int n; cin >> n; int a[n][n - 1]; for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j++) { cin >> a[i][j]...
replace
6
9
6
9
0
p02925
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define F first #define S second #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define pb push_back using namespace std; const int N = 1005; void fast() { std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } int n, a[N][N]; qu...
#include <bits/stdc++.h> #define ll long long #define F first #define S second #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define pb push_back using namespace std; const int N = 1005; void fast() { std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } int n, a[N][N]; qu...
replace
43
44
43
44
-11
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define FOR(I, A, B) for (int I = int(A); I < int(B); I++) int main() { cin.tie(0); ios::sync_with_stdio(false); clock_t start = clock(); int N, ans = 0; cin >> N; vector<int> A[N + 1]; FOR(i, 1, N + 1) { A[i].resize(N); FOR(j, 1, N) { cin >> A[i][j...
#include <bits/stdc++.h> using namespace std; #define FOR(I, A, B) for (int I = int(A); I < int(B); I++) int main() { cin.tie(0); ios::sync_with_stdio(false); clock_t start = clock(); int N, ans = 0; cin >> N; vector<int> A[N + 1]; FOR(i, 1, N + 1) { A[i].resize(N); FOR(j, 1, N) { cin >> A[i][j...
insert
48
48
48
49
TLE
p02925
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 MAXN = 1000; const int MAXV = MAXN * (MAXN - 1) / 2; vector<vector<int>> to(MAXV); vector<int> dp(MAXV); vector<bool> visited(MAXV, false); vector<bool> calculated(MAXV, false); int dfs(int v...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const int MAXN = 1000; const int MAXV = MAXN * (MAXN - 1) / 2; vector<vector<int>> to(MAXV); vector<int> dp(MAXV); vector<bool> visited(MAXV, false); vector<bool> calculated(MAXV, false); int dfs(int v...
replace
52
53
52
53
0
p02925
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vvi = vector<vi>; using vvl = vector<vl>; const ll INF = 1LL << 60; const ll MOD = 1000000007; template <class T> bool chmax(T &a, const T &b) { ...
#include "bits/stdc++.h" using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vvi = vector<vi>; using vvl = vector<vl>; const ll INF = 1LL << 60; const ll MOD = 1000000007; template <class T> bool chmax(T &a, const T &b) { ...
insert
48
48
48
50
0
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int N = 1005; int n, a[N][N], ans = 0, nxt[N], ptr[N]; int readInt() { char c; int ans = 0; while (1) { c = getchar(); if (c == ' ' || c == '\n') return ans; ans = (ans << 3) + (ans << 1) + (c - '0'); } } int main() { int n; n = read...
#include <bits/stdc++.h> using namespace std; const int N = 1005; int n, a[N][N], ans = 0, nxt[N], ptr[N]; int readInt() { char c; int ans = 0; while (1) { c = getchar(); if (c == ' ' || c == '\n') return ans; ans = (ans << 3) + (ans << 1) + (c - '0'); } } int main() { int n; n = read...
replace
32
33
32
34
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<vector<int>> a(n, vector<int>(n - 1)); for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j++) { int b; cin >> b; a.at(i).at(j) = b - 1; } } double start_time = clock(); vector<int> game(n...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<vector<int>> a(n, vector<int>(n - 1)); for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j++) { int b; cin >> b; a.at(i).at(j) = b - 1; } } double start_time = clock(); vector<int> game(n...
replace
65
66
65
66
TLE
p02925
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; // const int INF = (1 << 30) - 1; // const ll LL_...
#include <algorithm> #include <cassert> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; // const int INF = (1 << 30) - 1; // const ll LL_...
insert
70
70
70
71
TLE
p02925
C++
Time Limit Exceeded
#include <cstdio> using namespace std; int n, m, i, j, k, a, b; int str[1005][1005], vis[1050], top[1050]; int main() { scanf("%d", &n); for (i = 1; i <= n; i++) { for (j = 1; j < n; j++) { scanf("%d", &str[i][j]); } } for (i = 1; i <= n; i++) { top[i] = 1; } int day = 1; while (1) { ...
#include <cstdio> using namespace std; int n, m, i, j, k, a, b; int str[1050][1050], vis[1050], top[1050]; int main() { scanf("%d", &n); for (i = 1; i <= n; i++) { for (j = 1; j < n; j++) { scanf("%d", &str[i][j]); } } for (i = 1; i <= n; i++) { top[i] = 1; } int day = 1; while (1) { ...
replace
3
4
3
4
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T>...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T>...
insert
74
74
74
75
TLE
p02925
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> P; const int INF = (1 << 30); const ll INFLL = (1ll << 60); const ll MOD = (ll)(1e9 + 7); #define l_ength size void mul_mod(ll &a, ll b) { a *= b; a %= MOD; } void add_mod(ll &a, ll b) { a = (a < MOD) ? a : (a - MOD); ...
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> P; const int INF = (1 << 30); const ll INFLL = (1ll << 60); const ll MOD = (ll)(1e9 + 7); #define l_ength size void mul_mod(ll &a, ll b) { a *= b; a %= MOD; } void add_mod(ll &a, ll b) { a = (a < MOD) ? a : (a - MOD); ...
replace
75
76
75
76
0
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int M = 1e3 + 10; int a[M][M]; int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { for (int j = 1; j < n; j++) { scanf("%d", &a[i][j]); } a[i][0] = 1; } int num = n * (n - 1) / 2; int flag1 = 0; int ans = 0; int i = 0;...
#include <bits/stdc++.h> using namespace std; const int M = 2e3 + 10; int a[M][M]; int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { for (int j = 1; j < n; j++) { scanf("%d", &a[i][j]); } a[i][0] = 1; } int num = n * (n - 1) / 2; int flag1 = 0; int ans = 0; int i = 0;...
replace
2
3
2
3
TLE
p02925
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <numeric> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) int main() { int N; cin >> N; vector<vector<int>> A(N, vector<int>(N - 1)); REP(i, N) { REP...
#include <algorithm> #include <iostream> #include <numeric> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) int main() { int N; cin >> N; vector<vector<int>> A(N, vector<int>(N - 1)); REP(i, N) { REP...
replace
36
38
36
41
TLE
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep1(i, n) for (int i = 1; i <= (int)(n); ++i) #define rep11(i, n) for (int i = 1; i < (int)(n); ++i) #define repo(i, o, n) for (int i = o; i < (int)(n); +...
#include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep1(i, n) for (int i = 1; i <= (int)(n); ++i) #define rep11(i, n) for (int i = 1; i < (int)(n); ++i) #define repo(i, o, n) for (int i = o; i < (int)(n); +...
insert
41
41
41
43
0
p02925
C++
Runtime Error
#include <algorithm> #include <cfloat> #include <complex> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string> #include <unordered_map> #include <vector> using namespace s...
#include <algorithm> #include <cfloat> #include <complex> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string> #include <unordered_map> #include <vector> using namespace s...
insert
59
59
59
60
0
p02925
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define MOD 1000000007 #define REP(i, n) for (ll(i) = 0; (i) <...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define MOD 1000000007 #define REP(i, n) for (ll(i) = 0; (i) <...
replace
547
548
547
548
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define FI first #define SE second #define EPS 1e-9 #define ALL(a) a.begin(), a.end() #define SZ(a) int((a).size()) #define MS(s, n) memset(s, n, sizeof(s)) #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define FORE(i, a, b) for (int i = (a); i >= (b); i--) #define FORALL(it, a) ...
#include <bits/stdc++.h> #define FI first #define SE second #define EPS 1e-9 #define ALL(a) a.begin(), a.end() #define SZ(a) int((a).size()) #define MS(s, n) memset(s, n, sizeof(s)) #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define FORE(i, a, b) for (int i = (a); i >= (b); i--) #define FORALL(it, a) ...
insert
99
99
99
100
TLE
p02925
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define rep2(i,...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define rep2(i,...
replace
107
108
107
108
0
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); vector<vector<int>> a(n, vector<int>(n - 1)); for (auto &i : a) for (auto &j : i) { scanf("%d", &j); j--; } vector<int> outdeg(n * n + 5, 0); vector<vector<int>> adj(n * n + 5); vector<int> indeg(n * n ...
#include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); vector<vector<int>> a(n, vector<int>(n - 1)); for (auto &i : a) for (auto &j : i) { scanf("%d", &j); j--; } vector<int> outdeg(n * n + 5, 0); vector<vector<int>> adj(n * n + 5); vector<int> indeg(n * n ...
replace
18
26
18
29
TLE
p02925
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <map> #include <utility> #include <vector> #define WHITE 0 #define GRAY 1 #define BLACK 2 #define rep(i, start, end) for (int i = (int)start; i < (int)end; ++i) #define rrep(i, start, end) for (int i = (int)start - 1; i >= end; --i) #define arep(i, c) for (auto i = (c)....
#include <algorithm> #include <iostream> #include <map> #include <utility> #include <vector> #define WHITE 0 #define GRAY 1 #define BLACK 2 #define rep(i, start, end) for (int i = (int)start; i < (int)end; ++i) #define rrep(i, start, end) for (int i = (int)start - 1; i >= end; --i) #define arep(i, c) for (auto i = (c)....
insert
26
26
26
28
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1024, INF = 0x3f3f3f3f, M = 2e6 + 5; // const ll LNF = 0x3f3f3f3f3f3f3f3f; #define rep(i, l, r) for (int i = l; i <= r; i++) #define per(i, r, l) for (int i = r; i >= l; i--) #define repe(i, u) for (int i = head[u]; i; i = nxt[i]) int n, ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1023, INF = 0x3f3f3f3f, M = 2e6 + 5; // const ll LNF = 0x3f3f3f3f3f3f3f3f; #define rep(i, l, r) for (int i = l; i <= r; i++) #define per(i, r, l) for (int i = r; i >= l; i--) #define repe(i, u) for (int i = head[u]; i; i = nxt[i]) int n, ...
replace
3
4
3
4
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2e5 + 5, INF = 0x3f3f3f3f, M = 2e6 + 5; const ll LNF = 0x3f3f3f3f3f3f3f3f; #define rep(i, l, r) for (int i = l; i <= r; i++) #define per(i, r, l) for (int i = r; i >= l; i--) #define repe(i, u) for (int i = head[u]; i; i = nxt[i]) int n, ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n, a[1025][1025], vis[1025]; bool flag; bool ok() { for (int i = 1; i <= n; i++) if (a[i][0] != n) return 0; return 1; } int main() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); cin >> n; for (int i = 1; i <= n; i++) { ...
replace
3
8
3
4
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, a[1024][1024], z; bool vis[1024], flag; bool ok() { for (int i = 1; i <= n; i++) if (a[i][0] != n) return 0; return 1; } int main() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; ...
#include <bits/stdc++.h> using namespace std; int n, a[1025][1025], z; bool vis[1025], flag; bool ok() { for (int i = 1; i <= n; i++) if (a[i][0] != n) return 0; return 1; } int main() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; ...
replace
3
5
3
5
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, a[20000][20000], t = 0; bool flag[20000], fl = 0; bool judge() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j < n; ++j) cin >> a[i][j]; a[...
#include <bits/stdc++.h> using namespace std; int n, a[11000][11000], t = 0; bool flag[11000], fl = 0; bool judge() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j < n; ++j) cin >> a[i][j]; a[...
replace
2
4
2
4
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, a[8192][8192], t = 0; bool flag[8192], fl = 0; bool judge() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j < n; ++j) cin >> a[i][j]; a[i][...
#include <bits/stdc++.h> using namespace std; int n, a[11000][11000], t = 0; bool flag[11000], fl = 0; bool judge() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j < n; ++j) cin >> a[i][j]; a[...
replace
2
4
2
4
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, a[2049][2049], t = 0; bool flag[2049], fl = 0; bool judge() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j < n; ++j) cin >> a[i][j]; a[i][...
#include <bits/stdc++.h> using namespace std; int n, a[1025][1025], t = 0; bool flag[1025], fl = 0; bool judge() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j < n; ++j) cin >> a[i][j]; a[i][...
replace
2
4
2
4
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, a[6025][6025], t = 0; bool flag[6025], fl = 0; bool judge() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j < n; ++j) cin >> a[i][j]; a[i][...
#include <bits/stdc++.h> using namespace std; int n, a[1025][1025], t = 0; bool flag[1025], fl = 0; bool judge() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j < n; ++j) cin >> a[i][j]; a[i][...
replace
2
4
2
4
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, a[1024][1024], t = 0; bool flag[1024], fl = 0; bool judge() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j < n; ++j) cin >> a[i][j]; a[i][...
#include <bits/stdc++.h> using namespace std; int n, a[1025][1025], t = 0; bool flag[1025], fl = 0; bool judge() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { for (int j = 1; j < n; ++j) cin >> a[i][j]; a[i][...
replace
2
4
2
4
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, a[1005][1005], z; bool vis[1005], flag; bool ok() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { // ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); cin >> n; for (int i = 1; i <= n; ++i) { for (int j = ...
#include <bits/stdc++.h> using namespace std; int n, a[10010][10010], z; bool vis[10010], flag; bool ok() { for (int i = 1; i <= n; ++i) if (a[i][0] != n) return 0; return 1; } int main() { // ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); cin >> n; for (int i = 1; i <= n; ++i) { for (int j...
replace
3
5
3
5
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n, m) for (int i = n; i < (int)(m); i++) #define rrep(i, n, m) for (int i = ((int)(n)-1); i >= m; i--) #define all(x) (x).begin(), (x).end() typedef long long ll; const int INF = 1e9; const int MOD = 1e9 + 7; const ll LINF = 1e18; using namespace std; int main() { int n; cin ...
#include <bits/stdc++.h> #define rep(i, n, m) for (int i = n; i < (int)(m); i++) #define rrep(i, n, m) for (int i = ((int)(n)-1); i >= m; i--) #define all(x) (x).begin(), (x).end() typedef long long ll; const int INF = 1e9; const int MOD = 1e9 + 7; const ll LINF = 1e18; using namespace std; int main() { int n; cin ...
insert
41
41
41
45
TLE
p02925
C++
Runtime Error
// #pragma GCC target("avx2") // CPU 処理並列化 // #pragma GCC optimize("O3") // CPU 処理並列化 // #pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす #include <algorithm> #include <bitset> #include <cassert> #include <deque> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack...
// #pragma GCC target("avx2") // CPU 処理並列化 // #pragma GCC optimize("O3") // CPU 処理並列化 // #pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす #include <algorithm> #include <bitset> #include <cassert> #include <deque> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack...
replace
98
99
98
99
-6
terminate called without an active exception
p02925
C++
Time Limit Exceeded
// #include <bits/stdc++.h> using namespace std; #define ll long long #define maxnn 2000 int n; int ry[maxnn][maxnn]; int ru[maxnn]; int d = 0; int mark[maxnn]; int main() { cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; j < n; j++) { scanf("%d", &ry[i][j]); ru[i] = 1; } } while (1...
// #include <bits/stdc++.h> using namespace std; #define ll long long #define maxnn 2000 ll n; ll ry[maxnn][maxnn]; ll ru[maxnn]; ll d = 0; ll mark[maxnn]; int main() { cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; j < n; j++) { scanf("%d", &ry[i][j]); ru[i] = 1; } } while (1) { ...
replace
5
10
5
10
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define fs first #define sc second #define pb push_back #define mp make_pair #define eb emplace_back #define ALL(A) A.begin(), A.end() #define RALL(A) A.rbegin(), A.rend() typedef long long LL; typedef pair<LL, LL> P; const LL mod = 1000000007; const LL LINF = 1LL << 60; co...
#include <bits/stdc++.h> using namespace std; #define fs first #define sc second #define pb push_back #define mp make_pair #define eb emplace_back #define ALL(A) A.begin(), A.end() #define RALL(A) A.rbegin(), A.rend() typedef long long LL; typedef pair<LL, LL> P; const LL mod = 1000000007; const LL LINF = 1LL << 60; co...
replace
29
30
29
30
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; using Pii = pair<int, int>; using Pll = pair<ll, ll>; #define REP(i, l, n) for (int i = (l), i##_len = (n); i < i##_len; ++i) #define ALL(x) (x).begin(), (x).end() #define pb push_back ll gcd(ll a, ll b) { return b ? gcd(b, a...
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; using Pii = pair<int, int>; using Pll = pair<ll, ll>; #define REP(i, l, n) for (int i = (l), i##_len = (n); i < i##_len; ++i) #define ALL(x) (x).begin(), (x).end() #define pb push_back ll gcd(ll a, ll b) { return b ? gcd(b, a...
replace
63
64
63
64
TLE
p02925
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <iostream> #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) using namespace std; const int INF = 1001001001; const lon...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <iostream> #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) using namespace std; const int INF = 1001001001; const lon...
replace
74
75
74
75
0
p02925
C++
Time Limit Exceeded
#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 repR(i, n) for (int i = int(n) - 1; i >= 0; i--) #define rep1R(i, n) for (int i = int(n); i >= 1; i--) #define all(x) (x).begin(), (x).end() #define show(x) #x " ...
#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 repR(i, n) for (int i = int(n) - 1; i >= 0; i--) #define rep1R(i, n) for (int i = int(n); i >= 1; i--) #define all(x) (x).begin(), (x).end() #define show(x) #x " ...
insert
53
53
53
56
TLE
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<double> vd; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef pair<int, int> pii; typedef pair<double, double> pdd; typedef pair<ll, ll> pll; typedef vector<pi...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<double> vd; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef pair<int, int> pii; typedef pair<double, double> pdd; typedef pair<ll, ll> pll; typedef vector<pi...
replace
64
66
64
66
0
p02925
C++
Time Limit Exceeded
/*************************************************************** File name: E.cpp Author: ljfcnyali Create time: 2019年09月01日 星期日 20时16分00秒 ***************************************************************/ #include <bits/stdc++.h> using namespace std; #define REP(i, a, b) for (int i = (a), _end_...
/*************************************************************** File name: E.cpp Author: ljfcnyali Create time: 2019年09月01日 星期日 20时16分00秒 ***************************************************************/ #include <bits/stdc++.h> using namespace std; #define REP(i, a, b) for (int i = (a), _end_...
insert
41
41
41
43
TLE
p02925
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <queue> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; typedef int ll; ll mix_player_id(ll l, ll r) { if (l > r) { swap(l, r); } return l * 1000...
#include <algorithm> #include <array> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <queue> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; typedef int ll; ll mix_player_id(ll l, ll r) { if (l > r) { swap(l, r); } return l * 1000...
insert
44
44
44
45
TLE
p02925
C++
Runtime Error
#include <bits/stdc++.h> #define long long long int using namespace std; // @author: pashka int main() { ios::sync_with_stdio(false); int n; vector<vector<int>> a(n, vector<int>(n - 1)); for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j++) { cin >> a[i][j]; a[i][j]--; } }; ...
#include <bits/stdc++.h> #define long long long int using namespace std; // @author: pashka int main() { ios::sync_with_stdio(false); int n; cin >> n; vector<vector<int>> a(n, vector<int>(n - 1)); for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j++) { cin >> a[i][j]; a[i][j]--; ...
insert
12
12
12
13
-6
terminate called after throwing an instance of 'std::length_error' what(): cannot create std::vector larger than max_size()
p02925
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; using lint = long long int; using pint = pair<int, int>; using plint = pair<lint, lint>; #define ALL(x) (x).begin(), (x).end() #define SZ(x) ((lint)(x).size()) #define POW2(n) (1LL << (n)) #define FOR(i, begin, end) \ fo...
#include "bits/stdc++.h" using namespace std; using lint = long long int; using pint = pair<int, int>; using plint = pair<lint, lint>; #define ALL(x) (x).begin(), (x).end() #define SZ(x) ((lint)(x).size()) #define POW2(n) (1LL << (n)) #define FOR(i, begin, end) \ fo...
replace
27
28
27
28
0
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 1005; int n; int a[N][N]; int idx[N]; bool waiting[N][N]; int main() { scanf("%d", &n); vector<int> toCheck; for (int i = 0; i < n; ++i) { for (int j = 0; j < n - 1; ++j) { scanf("%d", &a[i][j]); --a[i][j]; } idx[i] = 0; ...
#include <bits/stdc++.h> using namespace std; const int N = 1005; int n; int a[N][N]; int idx[N]; bool waiting[N][N]; int main() { scanf("%d", &n); vector<int> toCheck; for (int i = 0; i < n; ++i) { for (int j = 0; j < n - 1; ++j) { scanf("%d", &a[i][j]); --a[i][j]; } idx[i] = 0; ...
replace
49
51
49
52
0
p02925
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, m, n) for (ll i = (ll)(m); i < (ll)(n); i++) #define fi first #define se second long long mo = 1000000007; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<ll, ll> Pll; templa...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, m, n) for (ll i = (ll)(m); i < (ll)(n); i++) #define fi first #define se second long long mo = 1000000007; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<ll, ll> Pll; templa...
replace
47
48
47
48
TLE
p02925
C++
Time Limit Exceeded
/* author : mpily :-() title : Competing.cpp time :Mon Sep 2 10:24:03 2019 */ #include <bits/stdc++.h> using namespace std; int main() { int n; int daycount = 0; cin >> n; vector<vector<int>> arr(n + 1); vector<int> tops(n + 1); for (int i = 1; i <= n; i++) { for (int j = 0; j < n - 1; j++) { ...
/* author : mpily :-() title : Competing.cpp time :Mon Sep 2 10:24:03 2019 */ #include <bits/stdc++.h> using namespace std; int main() { int n; int daycount = 0; cin >> n; vector<vector<int>> arr(n + 1); vector<int> tops(n + 1); for (int i = 1; i <= n; i++) { for (int j = 0; j < n - 1; j++) { ...
insert
47
47
47
51
TLE
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) #define rrep(i, a, b) for (int i = a; i >= b; i--) #define erep(i, a, n) for (int i = a; i <= n; i++) typedef long long ll; #define int long long #define vint vector<int> #define vvint vector<vector<int>> #define vstring vect...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) #define rrep(i, a, b) for (int i = a; i >= b; i--) #define erep(i, a, n) for (int i = a; i <= n; i++) typedef long long ll; #define int long long #define vint vector<int> #define vvint vector<vector<int>> #define vstring vect...
replace
79
82
79
84
0
p02925
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 REPr(i, n) for (int i = (n)-1; i >= 0; --i) #define FORq(i, m, n) for (int i = (m); i <= (n); ++i) #define FORqr(i, m, n) for (int i = (n); i >= (m); --i) #define PB push_back #define MP...
#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 REPr(i, n) for (int i = (n)-1; i >= 0; --i) #define FORq(i, m, n) for (int i = (m); i <= (n); ++i) #define FORqr(i, m, n) for (int i = (n); i >= (m); --i) #define PB push_back #define MP...
replace
129
130
129
131
0
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define ll long long #define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) const int inf = 1e9 + 7; const ll longinf = 1LL << 60; const ll mod = 1e9 + 7; void dfs(vector<vector<int>> &B, int tmp, int len, vector<bool> &vis, ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) const int inf = 1e9 + 7; const ll longinf = 1LL << 60; const ll mod = 1e9 + 7; void dfs(vector<vector<int>> &B, int tmp, int len, vector<bool> &vis, ...
replace
66
70
66
72
TLE
p02925
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define mod (int)(1e9 + 7) #define inf (int)(3e18) #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i < n; i++) #define P pair<int, int> #define PiP pair<int, pair<int, int>> #define PP pair<P, P> #define all(v) v.begin(), v.end() #define mkp...
#include <bits/stdc++.h> #define int long long #define mod (int)(1e9 + 7) #define inf (int)(3e18) #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i < n; i++) #define P pair<int, int> #define PiP pair<int, pair<int, int>> #define PP pair<P, P> #define all(v) v.begin(), v.end() #define mkp...
replace
68
71
68
71
0
p02925
C++
Time Limit Exceeded
#include <cassert> // PXjUXeZStdX #include <ccomplex> #include <cctype> #include <cerrno> #include <cfenv> #include <cfloat> #include <cinttypes> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstdbool> #include <cstddef> #inc...
#include <cassert> // PXjUXeZStdX #include <ccomplex> #include <cctype> #include <cerrno> #include <cfenv> #include <cfloat> #include <cinttypes> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstdbool> #include <cstddef> #inc...
replace
197
198
197
198
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n; queue<int> q[1001]; bool vis[1001]; int f() { memset(vis, 0, sizeof vis); bool flag = 0; for (int i = 1; i <= n; ++i) { if (vis[i]) continue; if (q[i].empty()) continue; int x = q[i].front(); if (q[x].empty()) continue; ...
#include <bits/stdc++.h> using namespace std; int n; queue<int> q[1001]; bool vis[1001]; int f() { memset(vis, 0, sizeof vis); bool flag = 0; for (int i = 1; i <= n; ++i) { if (vis[i]) continue; if (q[i].empty()) continue; int x = q[i].front(); if (q[x].empty()) continue; ...
replace
47
48
47
48
TLE
p02925
C++
Time Limit Exceeded
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> // clang-format off #define pb push_back #define eb emplace_back #define fi first #define se second #define each(x,v) for(auto& x : v) #define all(v) (v).begin(),(v).end() #define sz(v) ((int)(v).size()) #define ini(...) int __VA_ARGS__; in(__VA_ARGS__) #define inl...
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> // clang-format off #define pb push_back #define eb emplace_back #define fi first #define se second #define each(x,v) for(auto& x : v) #define all(v) (v).begin(),(v).end() #define sz(v) ((int)(v).size()) #define ini(...) int __VA_ARGS__; in(__VA_ARGS__) #define inl...
replace
77
78
77
79
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; constexpr int N = 1009; int n, a[N][N]; vector<vector<int>> g(N *N); vector<int> vis(N *N), mx(N *N); inline int idx(int i, int j) { if (i > j) swap(i, j); return i * n + j; } void dfs(int u) { vis[u] = 1; mx[u] = 1; for (int v : g[u]) { if (vis[v] == 1...
#include <bits/stdc++.h> using namespace std; constexpr int N = 1009; int n, a[N][N]; vector<vector<int>> g(N *N); vector<int> vis(N *N), mx(N *N); inline int idx(int i, int j) { if (i > j) swap(i, j); return i * n + j; } void dfs(int u) { vis[u] = 1; mx[u] = 1; for (int v : g[u]) { if (vis[v] == 1...
replace
21
22
21
22
TLE
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; #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, n, m) for (int(i) = (n); (i) < (m); ++(i)) constexpr int INF = 1e9; // constexpr ll INF = 1LL<<61; constexpr ll mod = 1e9 + 7; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #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, n, m) for (int(i) = (n); (i) < (m); ++(i)) constexpr int INF = 1e9; // constexpr ll INF = 1LL<<61; constexpr ll mod = 1e9 + 7; ...
insert
39
39
39
40
0
p02925
C++
Runtime Error
#include <algorithm> #include <iostream> #include <limits> #include <numeric> #include <queue> #include <vector> #define rep(i, x, n) for (int i = x; i < n; i++) using namespace std; const long long INF = 1LL << 60; bool compare_by_b(pair<int, long long> a, pair<int, long long> b) { if (a.second != b.second) { r...
#include <algorithm> #include <iostream> #include <limits> #include <numeric> #include <queue> #include <vector> #define rep(i, x, n) for (int i = x; i < n; i++) using namespace std; const long long INF = 1LL << 60; bool compare_by_b(pair<int, long long> a, pair<int, long long> b) { if (a.second != b.second) { r...
replace
18
19
18
19
0
p02925
C++
Time Limit Exceeded
#include <algorithm> #include <bits/stdc++.h> #include <fstream> #include <iostream> #include <limits> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string> #include <type_traits> #include <vector> using namespace std; typedef long long ll; #defin...
#include <algorithm> #include <bits/stdc++.h> #include <fstream> #include <iostream> #include <limits> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string> #include <type_traits> #include <vector> using namespace std; typedef long long ll; #defin...
insert
79
79
79
80
TLE
p02925
C++
Time Limit Exceeded
// Author -> Preeyadarshee Dev // // train hard win easy :D // nik is love // nik is motivation // // do modulo operations very carefully // try to avoid binary search, use linear search preferrably to make // calculations easier always make your custom binary search and watch out for // overflows read the problems car...
// Author -> Preeyadarshee Dev // // train hard win easy :D // nik is love // nik is motivation // // do modulo operations very carefully // try to avoid binary search, use linear search preferrably to make // calculations easier always make your custom binary search and watch out for // overflows read the problems car...
replace
62
63
62
64
TLE
p02925
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int N; int a[1000][1000]; int head[1001010]; struct Edge { int to; int next; } edge[1001010]; int cnt; void add_edge(int from, int to) { cnt++; edge[cnt].to = to; edge[cnt].next = head[from]; head[from] = cnt; } int deg[1001010]; int exist[1001010]; int ans; ...
#include <bits/stdc++.h> using namespace std; int N; int a[1010][1010]; int head[1001010]; struct Edge { int to; int next; } edge[1001010]; int cnt; void add_edge(int from, int to) { cnt++; edge[cnt].to = to; edge[cnt].next = head[from]; head[from] = cnt; } int deg[1001010]; int exist[1001010]; int ans; ...
replace
4
5
4
5
0
p02925
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> typedef long long ll; const ll longinf = 1LL << 60; using namespace std; struct node { int y, next; }; node e[1100000]; int loc[1100000]; i...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> typedef long long ll; const ll longinf = 1LL << 60; using namespace std; struct node { int y, next; }; node e[1100000]; int loc[1100000]; i...
replace
20
21
20
21
TLE
p02925
C++
Time Limit Exceeded
// template version 1.12 using namespace std; #include <bits/stdc++.h> #include <iostream> // varibable settings #define infile "../test/sample-1.in" #define int long long //{{{ const int INF = 1e18; const int MOD = 1e9 + 7; //}}} // define basic macro {{{ #define _overload3(_1, _2, _3, name, ...) name #define _rep(i...
// template version 1.12 using namespace std; #include <bits/stdc++.h> #include <iostream> // varibable settings #define infile "../test/sample-1.in" #define int long long //{{{ const int INF = 1e18; const int MOD = 1e9 + 7; //}}} // define basic macro {{{ #define _overload3(_1, _2, _3, name, ...) name #define _rep(i...
replace
95
96
95
96
TLE
p02925
C++
Time Limit Exceeded
/** * created: 01 September 2019 17:13:12 **/ #include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<pair<int, int>> vii; typedef long long ll; typedef vector<long long> vl; typedef pair<long long, long long> pll; typedef vector<pair<long long, long long>>...
/** * created: 01 September 2019 17:13:12 **/ #include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<pair<int, int>> vii; typedef long long ll; typedef vector<long long> vl; typedef pair<long long, long long> pll; typedef vector<pair<long long, long long>>...
insert
104
104
104
108
TLE
p02925
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; const int NMAX = 1000; int N, f; int ord[NMAX + 5][NMAX + 5]; int m[NMAX + 5][NMAX + 5]; vector<int> g[NMAX * NMAX + 5]; vector<int> w; int ind[NMAX + 5]; int main() { cin >> N; for (int i = 1; i <= N; i++) { for (int j = 1; j < N; j++) { c...
#include <iostream> #include <vector> using namespace std; const int NMAX = 1000; int N, f; int ord[NMAX + 5][NMAX + 5]; int m[NMAX + 5][NMAX + 5]; vector<int> g[NMAX * NMAX + 5]; vector<int> w; int ind[NMAX * NMAX + 5]; int main() { cin >> N; for (int i = 1; i <= N; i++) { for (int j = 1; j < N; j++) { ...
replace
14
15
14
15
0
p02925
C++
Time Limit Exceeded
#include <algorithm> #include <climits> #include <cmath> #include <csignal> #include <cstdio> #include <cstdlib> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> using ll = long long; using namespace std; int main() { int n = 0; cin >> n; vector<vector<i...
#include <algorithm> #include <climits> #include <cmath> #include <csignal> #include <cstdio> #include <cstdlib> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> using ll = long long; using namespace std; int main() { int n = 0; cin >> n; vector<vector<i...
replace
41
66
41
61
TLE
p02925
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(false); \ cin.tie(0); #define FOR(i, s, n) for (int i = s; i < (n); i++) #define REP(i, n) FOR(i, 0, n) #define ALL(n) (...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(false); \ cin.tie(0); #define FOR(i, s, n) for (int i = s; i < (n); i++) #define REP(i, n) FOR(i, 0, n) #define ALL(n) (...
replace
24
26
24
30
TLE