답안 #124424

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


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

Compilation message

strange_device.cpp: In function 'int main()':
strange_device.cpp:12:27: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
         scanf("%d%d",&t,&l);
                      ~~   ^
strange_device.cpp:12:27: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
strange_device.cpp:18:29: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'std::set<std::pair<long long int, long long int> >::size_type {aka long unsigned int}' [-Wformat=]
     printf("%lld",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("%lld%lld%lld",&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("%d%d",&t,&l);
         ~~~~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Incorrect 75 ms 12476 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Runtime error 4157 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 348 KB Output is correct
2 Incorrect 202 ms 32888 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 348 KB Output is correct
2 Incorrect 725 ms 63076 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 348 KB Output is correct
2 Incorrect 725 ms 63076 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 348 KB Output is correct
2 Incorrect 725 ms 63076 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 352 KB Output is correct
2 Runtime error 2116 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 Incorrect 75 ms 12476 KB Output isn't correct
3 Halted 0 ms 0 KB -