답안 #643080

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
643080 2022-09-21T07:16:37 Z cologne Broken Device 2 (JOI22_device2) C++17
10 / 100
732 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 A)
{
    --A;
    for (int i = 1; i <= 2000; i++)
    {
        if (A >= 2 * i + 1)
            A -= 2 * i + 1;
        else
        {
            vector<int> L(2 * i, 0);
            fill(L.begin(), L.begin() + A, 1);
            return {vector<int>(L.begin(), L.begin() + i),
                    vector<int>(L.begin() + i, L.end())};
        }
    }
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;

long long Bruno(vector<int> u)
{
    int ans = 1;
    for (int i = 1; i < (int)u.size() / 2; i++)
        ans += 2 * i + 1;
    for (int x : u)
        ans += x;
    return ans;
}

Compilation message

Anna.cpp: In function 'std::pair<std::vector<int>, std::vector<int> > Anna(long long int)':
Anna.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 508 KB Output is correct
2 Correct 14 ms 984 KB Output is correct
3 Correct 22 ms 1172 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 508 KB Output is correct
2 Correct 14 ms 984 KB Output is correct
3 Correct 22 ms 1172 KB Output is correct
4 Correct 495 ms 21964 KB Output is correct
5 Correct 517 ms 21852 KB Output is correct
6 Correct 501 ms 22148 KB Output is correct
7 Correct 501 ms 21604 KB Output is correct
8 Correct 493 ms 22236 KB Output is correct
9 Correct 721 ms 32500 KB Output is correct
10 Correct 732 ms 32500 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 508 KB Output is correct
2 Correct 14 ms 984 KB Output is correct
3 Correct 22 ms 1172 KB Output is correct
4 Correct 495 ms 21964 KB Output is correct
5 Correct 517 ms 21852 KB Output is correct
6 Correct 501 ms 22148 KB Output is correct
7 Correct 501 ms 21604 KB Output is correct
8 Correct 493 ms 22236 KB Output is correct
9 Correct 721 ms 32500 KB Output is correct
10 Correct 732 ms 32500 KB Output is correct
11 Incorrect 1 ms 644 KB Wrong Answer [3]
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 508 KB Output is correct
2 Correct 14 ms 984 KB Output is correct
3 Correct 22 ms 1172 KB Output is correct
4 Correct 495 ms 21964 KB Output is correct
5 Correct 517 ms 21852 KB Output is correct
6 Correct 501 ms 22148 KB Output is correct
7 Correct 501 ms 21604 KB Output is correct
8 Correct 493 ms 22236 KB Output is correct
9 Correct 721 ms 32500 KB Output is correct
10 Correct 732 ms 32500 KB Output is correct
11 Incorrect 1 ms 644 KB Wrong Answer [3]
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 508 KB Output is correct
2 Correct 14 ms 984 KB Output is correct
3 Correct 22 ms 1172 KB Output is correct
4 Correct 495 ms 21964 KB Output is correct
5 Correct 517 ms 21852 KB Output is correct
6 Correct 501 ms 22148 KB Output is correct
7 Correct 501 ms 21604 KB Output is correct
8 Correct 493 ms 22236 KB Output is correct
9 Correct 721 ms 32500 KB Output is correct
10 Correct 732 ms 32500 KB Output is correct
11 Incorrect 1 ms 644 KB Wrong Answer [3]
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 471 ms 524288 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -