답안 #595181

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
595181 2022-07-13T12:22:16 Z elkernos 송금 (JOI19_remittance) C++17
0 / 100
801 ms 308 KB
#include <bits/stdc++.h>

using namespace std;

int32_t main()
{
    cin.tie(0)->sync_with_stdio(0);
    int n;
    cin >> n;
    vector<int> a(n + 1), b(n + 1);
    for(int i = 1; i <= n; i++) {
        cin >> a[i] >> b[i];
    }
    auto ter = clock();
    while(clock() - ter <= 0.8 * CLOCKS_PER_SEC) {
        for(int i = 1; i <= n; i++) {
            if(a[i] > b[i]) {
                int take = (a[i] - b[i] + 1) / 2;
                a[i] -= 2 * take;
                a[i % n + 1] += take;
            }
        }
    }
    int good = 1;
    for(int i = 1; i <= n; i++) {
        good &= (a[i] == b[i]);
    }
    cout << (good ? "Yes" : "No") << '\n';
}
# 결과 실행 시간 메모리 Grader output
1 Correct 800 ms 300 KB Output is correct
2 Correct 801 ms 304 KB Output is correct
3 Correct 801 ms 296 KB Output is correct
4 Correct 801 ms 212 KB Output is correct
5 Correct 801 ms 300 KB Output is correct
6 Correct 801 ms 296 KB Output is correct
7 Correct 800 ms 300 KB Output is correct
8 Correct 800 ms 300 KB Output is correct
9 Correct 801 ms 300 KB Output is correct
10 Correct 801 ms 300 KB Output is correct
11 Correct 800 ms 300 KB Output is correct
12 Correct 800 ms 304 KB Output is correct
13 Correct 801 ms 300 KB Output is correct
14 Correct 801 ms 308 KB Output is correct
15 Correct 801 ms 296 KB Output is correct
16 Correct 801 ms 296 KB Output is correct
17 Correct 801 ms 308 KB Output is correct
18 Correct 800 ms 300 KB Output is correct
19 Correct 801 ms 300 KB Output is correct
20 Incorrect 801 ms 296 KB Output isn't correct
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 800 ms 300 KB Output is correct
2 Correct 801 ms 304 KB Output is correct
3 Correct 801 ms 296 KB Output is correct
4 Correct 801 ms 212 KB Output is correct
5 Correct 801 ms 300 KB Output is correct
6 Correct 801 ms 296 KB Output is correct
7 Correct 800 ms 300 KB Output is correct
8 Correct 800 ms 300 KB Output is correct
9 Correct 801 ms 300 KB Output is correct
10 Correct 801 ms 300 KB Output is correct
11 Correct 800 ms 300 KB Output is correct
12 Correct 800 ms 304 KB Output is correct
13 Correct 801 ms 300 KB Output is correct
14 Correct 801 ms 308 KB Output is correct
15 Correct 801 ms 296 KB Output is correct
16 Correct 801 ms 296 KB Output is correct
17 Correct 801 ms 308 KB Output is correct
18 Correct 800 ms 300 KB Output is correct
19 Correct 801 ms 300 KB Output is correct
20 Incorrect 801 ms 296 KB Output isn't correct
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 800 ms 300 KB Output is correct
2 Correct 801 ms 304 KB Output is correct
3 Correct 801 ms 296 KB Output is correct
4 Correct 801 ms 212 KB Output is correct
5 Correct 801 ms 300 KB Output is correct
6 Correct 801 ms 296 KB Output is correct
7 Correct 800 ms 300 KB Output is correct
8 Correct 800 ms 300 KB Output is correct
9 Correct 801 ms 300 KB Output is correct
10 Correct 801 ms 300 KB Output is correct
11 Correct 800 ms 300 KB Output is correct
12 Correct 800 ms 304 KB Output is correct
13 Correct 801 ms 300 KB Output is correct
14 Correct 801 ms 308 KB Output is correct
15 Correct 801 ms 296 KB Output is correct
16 Correct 801 ms 296 KB Output is correct
17 Correct 801 ms 308 KB Output is correct
18 Correct 800 ms 300 KB Output is correct
19 Correct 801 ms 300 KB Output is correct
20 Incorrect 801 ms 296 KB Output isn't correct
21 Halted 0 ms 0 KB -