# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
442763 | ToniB | Sob (COCI19_sob) | C++14 | 127 ms | 15144 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <algorithm>
#include <string>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <cmath>
#include <ext/pb_ds/assoc_container.hpp>
#include <bitset>
using namespace std;
using namespace __gnu_pbds;
#define FOR(i, x, n) for(int i = x; i < n; ++i)
#define REP(i, n) for(int i = 0; i < n; ++i)
#define TRACE(x) cerr << #x << " " << x << endl;
#define endl "\n"
#define mp make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MOD = 1e9+7;
const int inf = 2147483647;
const int maxN = 1e6 + 2;
int m, n;
vector<int> x, y;
int p1, p2, plast;
vector<pii> ans;
int main(){
// ios_base::sync_with_stdio(0);
cin >> n >> m;
REP(i, n) x.push_back(i);
for(int i = m; i < m+n; ++i){
y.push_back(i);
}
p2 = n-1;
while(p2 >= 0){
plast = p1;
while((y[p1] & x[p2]) != x[p2]){
p1++;
}
for(int i = p1; i >= plast; --i){
ans.push_back(mp(x[p2], y[i]));
p2--;
}
p1++;
}
REP(i, ans.size()){
cout << ans[i].first << " " << ans[i].second << endl;
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |