Submission #568678

#TimeUsernameProblemLanguageResultExecution timeMemory
568678almothana05Strange Device (APIO19_strange_device)C++14
10 / 100
5076 ms524288 KiB
#include<bits/stdc++.h> #define mod 1000000007 #define inf 10000000000000000 using namespace std; vector<pair<long long , long long> >num; map<pair<long long , long long> , long long>trans; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); long long menge , numm , nummer , ed , cmp , comp , erg = 0;; cin >> menge >> cmp >> comp; for(long long i = 0 ; i < menge ; i++){ cin >> numm >> nummer; num.push_back({numm , nummer}); } for(long long i = 0 ; i < menge ; i++){ for(long long j = num[i].first ; j <= num[i].second ; j++){ numm = (j + (long long)(j/comp)) % cmp; nummer = (j) % comp; trans[{numm , nummer}]++; if(trans[{numm , nummer}] == 1){ erg++; } } } cout << erg << "\n"; }

Compilation message (stderr)

strange_device.cpp: In function 'int main()':
strange_device.cpp:11:38: warning: unused variable 'ed' [-Wunused-variable]
   11 |    long long menge , numm , nummer , ed , cmp , comp , erg = 0;;
      |                                      ^~
#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...