Submission #564446

# Submission time Handle Problem Language Result Execution time Memory
564446 2022-05-19T08:55:36 Z 1zaid1 Building Skyscrapers (CEOI19_skyscrapers) C++17
0 / 100
251 ms 470092 KB
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long
typedef long long ll;
const int M = 2e7 + 5, MOD = 1e9+7;
int grid[3000][3000], vis[M], cnt;
vector<int> node[M];

vector<int> ans;
void dfs(int s) {
    ans.push_back(s);
    vis[s] = true;
    cnt++;
    for (int i:node[s]) {
        if (!vis[i]) dfs(i);
    }
}

signed main() {
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    srand(time(0));
    
    int n, t;
    cin >> n >> t;

    // vector<pair<int, int>> v(n);
    // for (auto&[a, b]:v) {
    //     cin >> a >> b;
    //     a += 1000;
    //     b += 1000;
    // }

    // for (int i = 0; i < n; i++) {
    //     grid[v[i].first][v[i].second] = i+1;
    // }

    // int ind = 1;
    // for (auto[a, b]:v) {
    //     for (int i = -1; i <= 1; i++) {
    //         for (int j = -1; j <= 1; j++) {
    //             if (!i && !j) continue;
    //             if (grid[a+i][b+j]) node[ind].push_back(grid[a+i][b+j]);
    //         }
    //     }

    //     ind++;
    // }

    // for (int i = 1; i <= n; i++) {
    //     sort(node[i].rbegin(), node[i].rend());
    // }

    // dfs(n);
    // reverse(ans.begin(), ans.end());
    // if (cnt == n) {
    //     cout << "YES" << endl;
    //     for (int i:ans) cout << i << endl;
     cout << "NO" << endl;

    return 0;
}

/*
3
2 1 2
0
0 
3
1 2
1 1
2 2

4
1 1 1 4

*/
# Verdict Execution time Memory Grader output
1 Incorrect 219 ms 469964 KB Contestant did not find solution
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 219 ms 469964 KB Contestant did not find solution
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 219 ms 469964 KB Contestant did not find solution
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 251 ms 470092 KB ans=NO N=1934
2 Correct 225 ms 470064 KB ans=NO N=1965
3 Incorrect 217 ms 469960 KB Contestant did not find solution
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 219 ms 469964 KB Contestant did not find solution
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 220 ms 469908 KB ans=NO N=66151
2 Correct 222 ms 469880 KB ans=NO N=64333
3 Incorrect 225 ms 469912 KB Contestant did not find solution
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 251 ms 470092 KB ans=NO N=1934
2 Correct 225 ms 470064 KB ans=NO N=1965
3 Incorrect 217 ms 469960 KB Contestant did not find solution
4 Halted 0 ms 0 KB -