Submission #208882

#TimeUsernameProblemLanguageResultExecution timeMemory
208882ArKCaGo (COCI16_go)C++17
50 / 50
5 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=-1,c,sum,d; 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){ d=b/a; b-=d*(a-2); c+=d; } 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...