Submission #124461

# Submission time Handle Problem Language Result Execution time Memory
124461 2019-07-03T11:16:45 Z HassenAissa Strange Device (APIO19_strange_device) C++14
0 / 100
2 ms 376 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);
    int res=0;
    for(long long unsigned i=0;i<n;i++)
    {
        scanf("%llu%llu",&t,&l);
        if(l-t>=a)
            res+=a*t;
        else
        {
            res+=(l-t)*t;
        }
    }
    printf("%d",res);
}

Compilation message

strange_device.cpp: In function 'int main()':
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);
         ~~~~~^~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 252 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 252 KB Output isn't correct
2 Halted 0 ms 0 KB -