# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
540598 | 2022-03-21T06:31:40 Z | Killer2501 | Sob (COCI19_sob) | C++14 | 1 ms | 340 KB |
#include <bits/stdc++.h> #define ll long long #define ld long double #define ull unsigned long long #define pb push_back #define pll pair<ll, ll> #define pii pair<int, int> #define fi first #define se second using namespace std; const int N = 2e5+5; const int M = 1e5+5; const int mod = 1e9+7; const ll base = 75; const int inf = 1e9+7; int a[N], b[N], dp[N][3], lst[N]; int n, m, q; ll ans; void sol() { cin >> n >> m; int lst = 0; for(int i = n-1; i >= 0; ) { for(int j = lst; j < n; j ++) { if(((i&(j+m)) == i)) { while(i >= 0 && ((i&(j+m)) == i)) { cout << i <<" "<<j+m<<'\n'; --i; --j; } lst = j+1; break; } } } } int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); #define task "test" if(fopen(task".inp", "r")) { freopen(task".inp", "r", stdin); freopen(task".out", "w", stdout); } int test = 1; //cin >> test; while(test -- > 0)sol(); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Integer parameter [name=y] equals to 724384, violates the range [724385, 724512] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 340 KB | Integer parameter [name=y] equals to 4814, violates the range [4815, 8191] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Integer parameter [name=y] equals to 177, violates the range [178, 189] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Integer parameter [name=y] equals to 724384, violates the range [724385, 724512] |
2 | Halted | 0 ms | 0 KB | - |