170062025-05-19 21:35:35gfaragoHáromszögeléscpp17Wrong answer 0/1004ms568 KiB
// Source: https://usaco.guide/general/io

#include <bits/stdc++.h>
using namespace std;

// Teszteset 1: válasz 5
// Teszteset 2: válasz 3, 4
// Teszteset 3: válasz 4
// Teszteset 4: válasz 4, 5
// Teszteset 5: válasz 15

int query(int x, int y);

int solve1(int n){
    vector<array<int, 3>> a;
    for(int i=0;i<n;i++){
        for(int j=i+2;j<n;j++){
            if(i==0 && j==n-1) continue;
            int value=max(i, n-j);
            if(i==0){
                value=max(j, n-j);
            }
            a.push_back({value, i, j});
        }
    }
    sort(a.begin(), a.end());
    for(int i=0;i<a.size();i++){
        int value = a[i][0];
        int from = a[i][1];
        int to = a[i][2];
        cout << from << " " << to << " " << value << " ans:" << (from*n+to) << endl;
        // if(from, to) {
        //     return from*n+to;
        // }
    }
    return 0;
}

int solve(int n){
    return 19;
}

// int main() {
//     solve(8);
// }
SubtaskSumTestVerdictTimeMemory
subtask10/100
1Wrong answer1ms316 KiB
2Wrong answer1ms316 KiB
3Wrong answer1ms316 KiB
4Wrong answer1ms316 KiB
5Wrong answer1ms316 KiB
6Wrong answer1ms316 KiB
7Wrong answer1ms316 KiB
8Wrong answer1ms328 KiB
9Wrong answer1ms332 KiB
10Wrong answer1ms316 KiB
11Wrong answer1ms508 KiB
12Wrong answer1ms316 KiB
13Wrong answer1ms316 KiB
14Wrong answer1ms316 KiB
15Wrong answer1ms316 KiB
16Wrong answer1ms396 KiB
17Wrong answer1ms316 KiB
18Wrong answer1ms316 KiB
19Wrong answer1ms316 KiB
20Wrong answer1ms316 KiB
21Wrong answer1ms316 KiB
22Wrong answer1ms568 KiB
23Wrong answer1ms316 KiB
24Wrong answer1ms508 KiB
25Wrong answer1ms316 KiB
26Wrong answer1ms316 KiB
27Wrong answer1ms316 KiB
28Wrong answer1ms316 KiB
29Wrong answer1ms316 KiB
30Wrong answer1ms316 KiB
31Wrong answer1ms316 KiB
32Wrong answer1ms316 KiB
33Wrong answer1ms316 KiB
34Wrong answer1ms316 KiB
35Wrong answer1ms320 KiB
36Wrong answer1ms316 KiB
37Wrong answer1ms316 KiB
38Wrong answer4ms408 KiB
39Wrong answer3ms316 KiB
40Wrong answer4ms508 KiB