Submission #208881

#TimeUsernameProblemLanguageResultExecution timeMemory
208881ArKCaGo (COCI16_go)C++17
36 / 50
6 ms376 KiB
#include<bits/stdc++.h> #define f1 first #define s2 second #define pb push_back #define pob pop_back #define int ll #define ll long long #define PII pair<int,int> #define N 100005 #define mod 1000000007 using namespace std; int t,n,a,b,mx,c,sum; string s,ss; int32_t main(){ // freopen("a.gir","r",stdin); // freopen("a.cik","w",stdout); // // scanf("%lld",&t); while(t--){ cin>>s; scanf("%lld %lld",&a,&b); c=0; while(b>=a){ c+=b/a; b-=c*(a-2); } sum+=c; if(c>mx){ mx=c; ss=s; } } printf("%lld\n", sum); cout<<ss<<endl; }

Compilation message (stderr)

go.cpp: In function 'int32_t main()':
go.cpp:22:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld",&t);
  ~~~~~^~~~~~~~~~~
go.cpp:25:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld %lld",&a,&b);
   ~~~~~^~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...