Submission #1095123

#TimeUsernameProblemLanguageResultExecution timeMemory
1095123vjudge1Strange Device (APIO19_strange_device)C++17
10 / 100
5065 ms524288 KiB
#include <iostream> #include <vector> #include <algorithm> #include <cassert> #include <set> #warning That's not the baby, that's my baby #define debug(x) #x << " = " << x << '\n' using ll = long long; const int INF = 1e9; int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(0); std::cout.tie(0); #ifdef LOCAL freopen("input.txt", "r", stdin); #endif int n; ll A, B; std::cin >> n >> A >> B; std::set<std::pair<ll, ll>> st; for (int i = 0; i < n; i++) { ll l, r; std::cin >> l >> r; for (ll j = l; j <= r; j++) { st.insert({(j + j / B) % A, j % B}); } } std::cout << (int) st.size(); return 0; }

Compilation message (stderr)

strange_device.cpp:6:2: warning: #warning That's not the baby, that's my baby [-Wcpp]
    6 | #warning That's not the baby, that's my baby
      |  ^~~~~~~
#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...