답안 #839314

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
839314 2023-08-29T16:32:43 Z tch1cherin 이상한 기계 (APIO19_strange_device) C++17
0 / 100
1588 ms 524288 KB
#include <bits/stdc++.h>
using namespace std;

const long long INF = 2e18;

int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  int N;
  long long A, B;
  cin >> N >> A >> B;
  long long M = INF / A >= B ? A * B : INF;
  vector<long long> rem;
  for (int i = 0; i < N; i++) {
    long long L, R;
    cin >> L >> R;
    for (auto i = L; i <= R; i++) {
      rem.push_back(i % M);
    }
  }
  sort(rem.begin(), rem.end());
  cout << (unique(rem.begin(), rem.end()) - rem.begin()) << "\n";
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 10 ms 2896 KB Output is correct
3 Correct 26 ms 4928 KB Output is correct
4 Incorrect 1 ms 468 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 320 KB Output is correct
2 Runtime error 488 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 31 ms 8640 KB Output is correct
3 Correct 33 ms 8648 KB Output is correct
4 Correct 31 ms 8640 KB Output is correct
5 Runtime error 484 ms 524288 KB Execution killed with signal 9
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 292 ms 9032 KB Output is correct
3 Runtime error 647 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 292 ms 9032 KB Output is correct
3 Runtime error 647 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 292 ms 9032 KB Output is correct
3 Runtime error 647 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1588 ms 263852 KB Output is correct
3 Runtime error 556 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 10 ms 2896 KB Output is correct
3 Correct 26 ms 4928 KB Output is correct
4 Incorrect 1 ms 468 KB Output isn't correct
5 Halted 0 ms 0 KB -