Submission #1027607

# Submission time Handle Problem Language Result Execution time Memory
1027607 2024-07-19T07:58:29 Z FIFI_cpp Unija (COCI17_unija) C++17
0 / 100
14 ms 65536 KB
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <stack>
#include <deque>
#include <fstream>
#include <iterator>
#include <set>
#include <map>
#include <unordered_map>
#include <iomanip>
#include <cctype>
#include <string>
#include <cassert>
#include <set>
#include <bitset>
#include <unordered_set>
using ll = int64_t;
#define pb push_back
#define all(a) a.begin(),a.end()
#define ppi pair<pair<int,int>,int>
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define int int64_t
// xcode cant include bits/stdc++.h
using namespace std;
//ifstream fin ("sleepy.in");
//ofstream fout ("sleepy.out");
/*   /\_/\
*   (= ._.)
*   / >  \>
*/
// encouraging cat
const int INF = 100000000000000;
const int mod = 1000000007;
const int MAXN = 10000001;
int32_t main() {
    int n;
    cin >> n;
    vector<int> h(MAXN,0);
    for (int i = 0;i < n;i++)
    {
        int x,y;
        cin >> x >> y;
        h[x/2] = max(h[x/2],y/2);
    }
    int mx = 0;
    int a = 0;
    for (int i = MAXN - 1;i >= 1;i--)
    {
        mx = max(h[i],mx);
        a += mx;
    }
    a *= 4;
    cout << a << '\n';
    return 0;
}

Compilation message

unija.cpp:32:9: warning: "/*" within comment [-Wcomment]
   32 | /*   /\_/\
      |
# Verdict Execution time Memory Grader output
1 Runtime error 12 ms 65536 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 13 ms 65536 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 12 ms 65536 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 14 ms 65536 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 12 ms 65536 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 12 ms 65536 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 13 ms 65536 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 13 ms 65536 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 12 ms 65536 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 13 ms 65536 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -