Submission #568678

# Submission time Handle Problem Language Result Execution time Memory
568678 2022-05-26T03:38:43 Z almothana05 Strange Device (APIO19_strange_device) C++14
10 / 100
5000 ms 524288 KB
#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

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 time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 58 ms 12772 KB Output is correct
3 Correct 89 ms 18384 KB Output is correct
4 Correct 3 ms 832 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 2 ms 468 KB Output is correct
8 Correct 1 ms 320 KB Output is correct
9 Correct 12 ms 1108 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 1 ms 316 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 316 KB Output is correct
15 Correct 55 ms 6992 KB Output is correct
16 Correct 35 ms 7236 KB Output is correct
17 Correct 70 ms 11808 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Execution timed out 5074 ms 483940 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 179 ms 32244 KB Output is correct
3 Correct 223 ms 32088 KB Output is correct
4 Correct 157 ms 30540 KB Output is correct
5 Execution timed out 5076 ms 79036 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 598 ms 86660 KB Output is correct
3 Runtime error 3126 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 598 ms 86660 KB Output is correct
3 Runtime error 3126 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 598 ms 86660 KB Output is correct
3 Runtime error 3126 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Runtime error 2076 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 58 ms 12772 KB Output is correct
3 Correct 89 ms 18384 KB Output is correct
4 Correct 3 ms 832 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 2 ms 468 KB Output is correct
8 Correct 1 ms 320 KB Output is correct
9 Correct 12 ms 1108 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 1 ms 316 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 316 KB Output is correct
15 Correct 55 ms 6992 KB Output is correct
16 Correct 35 ms 7236 KB Output is correct
17 Correct 70 ms 11808 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Execution timed out 5074 ms 483940 KB Time limit exceeded
21 Halted 0 ms 0 KB -