답안 #1114009

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1114009 2024-11-18T05:54:55 Z Wansur Broken Device 2 (JOI22_device2) C++17
10 / 100
759 ms 524288 KB
#include "Anna.h"
#include <bits/stdc++.h>

using namespace std;

int Declare() {
    return 2000;
}

pair<vector<int>, vector<int>> Anna(long long x) {
    vector<int> a, b;
    if(x % 2000 > x / 2000) {
        for(int i = 1; i <= x % 2000; i++) {
            a.push_back(1);
            b.push_back(1);
        }
        for(int i = 0; i < x / 2000; i++) {
            b[i] = 0;
        }
    }
    else {
        for(int i = 1; i <= x / 2000; i++) {
            a.push_back(0);
            b.push_back(0);
        }
        for(int i = 0; i < x % 2000; i++) {
            a[i] = 1;
        }
    }
    return {a, b};
}
#include "Bruno.h"
#include <bits/stdc++.h>

typedef long long ll;
using namespace std;

long long Bruno(vector<int> u) {
    int cnt0 = 0, cnt1 = 0;
    int sz = (int)u.size();
    sz /= 2;
    for(int x : u) {
        cnt0 += (x == 0);
        cnt1 += (x == 1);
    }
    if(cnt0 < cnt1) {
        return sz + cnt0 * 2000;
    }
    return cnt1 + sz * 2000;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 764 KB Output is correct
2 Correct 135 ms 9084 KB Output is correct
3 Correct 359 ms 25244 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 764 KB Output is correct
2 Correct 135 ms 9084 KB Output is correct
3 Correct 359 ms 25244 KB Output is correct
4 Correct 338 ms 22336 KB Output is correct
5 Correct 347 ms 21880 KB Output is correct
6 Correct 349 ms 22520 KB Output is correct
7 Correct 346 ms 22480 KB Output is correct
8 Correct 341 ms 22216 KB Output is correct
9 Correct 488 ms 33004 KB Output is correct
10 Correct 481 ms 32564 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 764 KB Output is correct
2 Correct 135 ms 9084 KB Output is correct
3 Correct 359 ms 25244 KB Output is correct
4 Correct 338 ms 22336 KB Output is correct
5 Correct 347 ms 21880 KB Output is correct
6 Correct 349 ms 22520 KB Output is correct
7 Correct 346 ms 22480 KB Output is correct
8 Correct 341 ms 22216 KB Output is correct
9 Correct 488 ms 33004 KB Output is correct
10 Correct 481 ms 32564 KB Output is correct
11 Incorrect 1 ms 772 KB Wrong Answer [3]
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 764 KB Output is correct
2 Correct 135 ms 9084 KB Output is correct
3 Correct 359 ms 25244 KB Output is correct
4 Correct 338 ms 22336 KB Output is correct
5 Correct 347 ms 21880 KB Output is correct
6 Correct 349 ms 22520 KB Output is correct
7 Correct 346 ms 22480 KB Output is correct
8 Correct 341 ms 22216 KB Output is correct
9 Correct 488 ms 33004 KB Output is correct
10 Correct 481 ms 32564 KB Output is correct
11 Incorrect 1 ms 772 KB Wrong Answer [3]
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 764 KB Output is correct
2 Correct 135 ms 9084 KB Output is correct
3 Correct 359 ms 25244 KB Output is correct
4 Correct 338 ms 22336 KB Output is correct
5 Correct 347 ms 21880 KB Output is correct
6 Correct 349 ms 22520 KB Output is correct
7 Correct 346 ms 22480 KB Output is correct
8 Correct 341 ms 22216 KB Output is correct
9 Correct 488 ms 33004 KB Output is correct
10 Correct 481 ms 32564 KB Output is correct
11 Incorrect 1 ms 772 KB Wrong Answer [3]
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 759 ms 524288 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -