# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
595167 | 2022-07-13T12:10:30 Z | AGE | Sob (COCI19_sob) | C++14 | 344 ms | 3916 KB |
#include<bits/stdc++.h> #define F first #define S second #define pb push_back #define int long long using namespace std; const int N=1e5+10,M=2e3,mod=10; int a[N]; int c[N][35],dp[N][35]; main() { int n,m; cin>>n>>m; int index=-1; for(int i=m+n-1;i>=m;i--){ int y=n-1; int x=(i&y); if(x==y){ index=i; break; } } int indexx=index+1; int i=n-1; while(i>-1){ cout<<i<<" "<<index<<endl; i--; index--; if(index==m-1) index=m+n-1; } if(i!=-1) cout<<i<<" "<<indexx<<endl; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 316 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 344 ms | 3916 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 340 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Incorrect | 1 ms | 212 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 316 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 344 ms | 3916 KB | Output is correct |
5 | Incorrect | 5 ms | 340 KB | Output isn't correct |
6 | Halted | 0 ms | 0 KB | - |