답안 #124443

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
124443 2019-07-03T10:48:56 Z HassenAissa 이상한 기계 (APIO19_strange_device) C++14
10 / 100
5000 ms 524292 KB
#include <bits/stdc++.h>
using namespace std;


int main()
{
    long long unsigned n,a,b,t,l;
    scanf("%llu%llu%llu",&n,&a,&b);
    set<pair<long long unsigned,long long unsigned> > res;
    for(long long unsigned i=0;i<n;i++)
    {
        scanf("%llu%llu",&t,&l);
        for(long long unsigned j=t;j<=l;j++)
        {
            res.insert(make_pair((j+j/b)%a,j%b));
        }
    }
    printf("%llu",res.size());
}

Compilation message

strange_device.cpp: In function 'int main()':
strange_device.cpp:18:29: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type 'std::set<std::pair<long long unsigned int, long long unsigned int> >::size_type {aka long unsigned int}' [-Wformat=]
     printf("%llu",res.size());
                   ~~~~~~~~~~^
strange_device.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%llu%llu%llu",&n,&a,&b);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
strange_device.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%llu%llu",&t,&l);
         ~~~~~^~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 74 ms 12436 KB Output is correct
3 Correct 115 ms 18308 KB Output is correct
4 Correct 4 ms 888 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 3 ms 504 KB Output is correct
8 Correct 3 ms 376 KB Output is correct
9 Correct 12 ms 1144 KB Output is correct
10 Correct 2 ms 348 KB Output is correct
11 Correct 2 ms 256 KB Output is correct
12 Correct 2 ms 256 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 59 ms 7032 KB Output is correct
16 Correct 41 ms 7204 KB Output is correct
17 Correct 95 ms 7932 KB Output is correct
18 Correct 2 ms 252 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 252 KB Output is correct
2 Runtime error 3885 ms 524292 KB Execution killed with signal 9 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 424 KB Output is correct
2 Correct 196 ms 32332 KB Output is correct
3 Correct 218 ms 32148 KB Output is correct
4 Correct 195 ms 30584 KB Output is correct
5 Execution timed out 5016 ms 62532 KB Time limit exceeded
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 805 ms 62968 KB Output is correct
3 Runtime error 2878 ms 524292 KB Execution killed with signal 9 (could be triggered by violating memory limits)
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 805 ms 62968 KB Output is correct
3 Runtime error 2878 ms 524292 KB Execution killed with signal 9 (could be triggered by violating memory limits)
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 805 ms 62968 KB Output is correct
3 Runtime error 2878 ms 524292 KB Execution killed with signal 9 (could be triggered by violating memory limits)
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Runtime error 2017 ms 524292 KB Execution killed with signal 9 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 74 ms 12436 KB Output is correct
3 Correct 115 ms 18308 KB Output is correct
4 Correct 4 ms 888 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 3 ms 504 KB Output is correct
8 Correct 3 ms 376 KB Output is correct
9 Correct 12 ms 1144 KB Output is correct
10 Correct 2 ms 348 KB Output is correct
11 Correct 2 ms 256 KB Output is correct
12 Correct 2 ms 256 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 59 ms 7032 KB Output is correct
16 Correct 41 ms 7204 KB Output is correct
17 Correct 95 ms 7932 KB Output is correct
18 Correct 2 ms 252 KB Output is correct
19 Correct 2 ms 252 KB Output is correct
20 Runtime error 3885 ms 524292 KB Execution killed with signal 9 (could be triggered by violating memory limits)
21 Halted 0 ms 0 KB -