Submission #200459

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2004592020-02-06 21:27:50extraterrestrialStrange Device (APIO19_strange_device)C++14
100 / 100
1966 ms241336 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define F first
#define S second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define SZ(x) (int)x.size()
#define int ll
int k, in_group, groups, a, b;
int get_num(int x) {
return (x / (b + 1)) % in_group;
}
int scanline(vector<pair<int, int>> &ev) {
sort(all(ev));
int cl = -1, balance = 0, res = 0;
for (auto it : ev) {
balance -= it.S;
if (balance == 0) {
res += it.F - cl;
cl = -1;
}
else {
if (cl == -1) {
cl = it.F;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

strange_device.cpp: In function 'int main()':
strange_device.cpp:103:8: warning: unused variable 'f' [-Wunused-variable]
    int f = get_num(cx), s = get_num((tr + tr / b)), cnt = (tr - tl + 1) / b;
        ^
strange_device.cpp:103:25: warning: unused variable 's' [-Wunused-variable]
    int f = get_num(cx), s = get_num((tr + tr / b)), cnt = (tr - tl + 1) / b;
                         ^
strange_device.cpp:62:7: warning: unused variable 'lim' [-Wunused-variable]
   int lim = 10; 
       ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...