답안 #1031917

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1031917 2024-07-23T08:42:17 Z Gangsta 이상한 기계 (APIO19_strange_device) C++14
10 / 100
5000 ms 524288 KB
/*
ID: didarco1
TASK: 
LANG: c++17
*/
#include "bits/stdc++.h"
#define ll long long int
#define pb push_back
#define pii pair<ll,ll>
#define ff first
#define ss second
#define sz size()

const int N = 2e5 + 1;

using namespace std;

ll n, a, b;

set <pii> s;

int main(){
    cin >> n >> a >> b;
    for(int i = 1; i <= n; i++){
    	ll x, y;
    	cin >> x >> y;
    	for(ll j = x; j <= y; j++){
    		ll san = j + j/b;
    		san %= a;
    		int san1 = j % b;
    		s.insert({san,san1});
    	}
    }
    cout << (int)s.sz;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 34 ms 12624 KB Output is correct
3 Correct 48 ms 18404 KB Output is correct
4 Correct 1 ms 856 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 604 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 5 ms 1116 KB Output is correct
10 Correct 0 ms 360 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 1 ms 604 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 23 ms 7156 KB Output is correct
16 Correct 24 ms 7000 KB Output is correct
17 Correct 101 ms 10320 KB Output is correct
18 Correct 1 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Runtime error 1694 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 600 KB Output is correct
2 Correct 93 ms 32228 KB Output is correct
3 Correct 101 ms 32092 KB Output is correct
4 Correct 72 ms 30544 KB Output is correct
5 Execution timed out 5077 ms 62548 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 975 ms 100176 KB Output is correct
3 Runtime error 1314 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 975 ms 100176 KB Output is correct
3 Runtime error 1314 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 975 ms 100176 KB Output is correct
3 Runtime error 1314 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Runtime error 948 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 34 ms 12624 KB Output is correct
3 Correct 48 ms 18404 KB Output is correct
4 Correct 1 ms 856 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 604 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 5 ms 1116 KB Output is correct
10 Correct 0 ms 360 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 1 ms 604 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 23 ms 7156 KB Output is correct
16 Correct 24 ms 7000 KB Output is correct
17 Correct 101 ms 10320 KB Output is correct
18 Correct 1 ms 344 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Runtime error 1694 ms 524288 KB Execution killed with signal 9
21 Halted 0 ms 0 KB -