Submission #503976

#TimeUsernameProblemLanguageResultExecution timeMemory
503976nicecoder37Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms292 KiB
/*MKAAN THE KING*/ #include <bits/stdc++.h> #define space " " #define endl "\n" #define gcd __gcd #define fi first #define se second #define mp make_pair #define pb push_back #define pf push_front #define inf 1000000000 #define md 1000000007 #define li 105 #define lo long long using namespace std; int n,a,b,c,tem1,tem2,vis[li]; int main(){ scanf("%d",&n); for(int i=1;i<=8;i++) vis[i]=-inf; for(int i=1;i<=n;i++){ scanf("%d %d %d",&a,&b,&c); if(b<=4) tem1+=100; else tem2+=100; if(a-vis[b]<=10){ if(b<=4) tem1+=50; else tem2+=50; } vis[b]=a; } printf("%d %d\n",tem1,tem2); return 0; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:18:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |  scanf("%d",&n);
      |  ~~~~~^~~~~~~~~
Main.cpp:21:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |   scanf("%d %d %d",&a,&b,&c);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...