CSES - Datatähti 2023 loppu - Results
Submission details
Task:Palikat
Sender:vgtcross
Submission time:2023-01-21 16:36:06 +0200
Language:text (C++11)
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttimescore
#10.00 s0details

Code

#include <bits/stdc++.h>

#define MODE 0

#if MODE == 1
#define debug(x) cout << #x << ": " << x << endl
#define log(x) cout << x << endl
#else
#define debug(x)
#define log(x)
#endif

using namespace std;
using ll = long long;
using pii = pair<int, int>;

void solve() {
    int n;
    cin >> n;

    int w = 2023 - n;

    int diff = n - w;

    int v = 0;
    while (v * v * v - 3 * v * v < diff && v < 7)
        ++v;
    
    cout << v << '\n';

    /*
    for (int i = 0; i < 7; ++i) {
        for (int j = 0; j < 17; ++j) {
            for (int k = 0; k < 17; ++k) {
                if (n == 0) {
                    cout << '.'; 
                    --w;
                } else if (w == 0) {
                    cout << '#';
                    --n;
                } else if (((i^j^k)&1)) {
                    cout << '#';
                    --n;
                } else {
                    cout << '.';
                    --w;
                }
            }
            cout << '\n';
        }
        cout << '\n';
    }*/
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);

    int t;
    cin >> t;

    while (t--) {
        solve();
    }
}

Test details

Test 1

Verdict:

input
(empty)

correct output
(empty)

user output
#include <bits/stdc++.h>

#define MODE 0

#if MODE == 1
...