답안 #235608

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
235608 2020-05-28T19:59:43 Z doowey Sob (COCI19_sob) C++14
39 / 110
6 ms 512 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;

#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);

const int N = 510;
bool use[N];

int main(){
  fastIO;
  int n, m;
  cin >> n >> m;
  for(int i = n - 1; i >= 0 ; i -- ){
    for(int j = 0 ; j < n; j ++ ){
      if(use[j]) continue;
      if((i & (m + j))==i){
        use[j]=true;
        cout << i << " " << m + j << "\n";
        break;
      }
    }
  }
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 4 ms 384 KB Output is correct
3 Correct 4 ms 384 KB Output is correct
4 Runtime error 5 ms 384 KB Execution killed with signal 11 (could be triggered by violating memory limits)
# 결과 실행 시간 메모리 Grader output
1 Runtime error 6 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 4 ms 256 KB Output is correct
4 Correct 5 ms 384 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 5 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 4 ms 384 KB Output is correct
3 Correct 4 ms 384 KB Output is correct
4 Runtime error 5 ms 384 KB Execution killed with signal 11 (could be triggered by violating memory limits)