답안 #781620

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
781620 2023-07-13T08:42:44 Z makanhulia 이상한 기계 (APIO19_strange_device) C++17
0 / 100
5000 ms 524288 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;

ll n, a, b;
set<pll> st;

int main(){
  cin >> n >> a >> b;
  for (int i = 0; i < n; ++i)
  {
    ll l, r;
    cin >> l >> r;
    for (int i = l; i <= r; ++i)
    {
      pll hasil = {(i + i/b) % a, i % b};
      ll lseb = st.size();
      st.insert(hasil);
    }
  }

  cout << st.size() << "\n";
  return 0;
}

Compilation message

strange_device.cpp: In function 'int main()':
strange_device.cpp:18:10: warning: unused variable 'lseb' [-Wunused-variable]
   18 |       ll lseb = st.size();
      |          ^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Execution timed out 5081 ms 405052 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Runtime error 1625 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 296 KB Output is correct
2 Execution timed out 5052 ms 60528 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Execution timed out 5085 ms 77552 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Execution timed out 5085 ms 77552 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Execution timed out 5085 ms 77552 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Runtime error 1284 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Execution timed out 5081 ms 405052 KB Time limit exceeded
3 Halted 0 ms 0 KB -