Submission #64502

# Submission time Handle Problem Language Result Execution time Memory
64502 2018-08-04T16:40:05 Z theknife2001 Tarifa (COCI16_tarifa) C++17
0 / 50
4 ms 652 KB
#include<bits/stdc++.h>


using namespace std;


int main()
{
  int x;
  cin>>x;
  int n;
  cin>>n;
  int a;
  int last=0;
  for(int i=0;i<n;i++)
  {
   	cin>>a; 
    last+=x;
    last-=a;
    last=max(last,0);
  }
  cout<<last<<endl;
  return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 248 KB Output isn't correct
2 Incorrect 2 ms 360 KB Output isn't correct
3 Incorrect 3 ms 480 KB Output isn't correct
4 Incorrect 3 ms 480 KB Output isn't correct
5 Incorrect 3 ms 592 KB Output isn't correct
6 Incorrect 3 ms 600 KB Output isn't correct
7 Incorrect 4 ms 600 KB Output isn't correct
8 Incorrect 3 ms 600 KB Output isn't correct
9 Incorrect 3 ms 600 KB Output isn't correct
10 Incorrect 2 ms 652 KB Output isn't correct