Submission #94132

#TimeUsernameProblemLanguageResultExecution timeMemory
94132hamzqq9Go (COCI16_go)C++14
50 / 50
2 ms376 KiB
#include<bits/stdc++.h> #define st first #define nd second #define pb push_back #define ppb pop_back #define ppf pop_front #define umax(x,y) x=max(x,y) #define umin(x,y) x=min(x,y) #define ll long long #define ii pair<int,int> #define iii pair<ii,int> #define iiii pair<ii,ii> #define sz(x) ((int) x.size()) #define orta ((bas+son)/2) #define all(x) x.begin(),x.end() #define dbgs(x) cerr<<(#x)<<" --> "<<(x)<<" " #define dbg(x) cerr<<(#x)<<" --> "<<(x)<<endl;getchar() #define pw(x) (1<<(x)) #define inf 1000000000000000000ll #define MOD 1000000007 #define N 100005 #define M 15000005 #define LOG 20 #define KOK 650 #define EPS 0.00001 using namespace std; int n,x,y,ans,t,mx; char s[100][100]; int main() { // freopen("input.txt","r",stdin); scanf("%d",&n); for(int i=1;i<=n;i++) { scanf("%s",s[i]+1); scanf("%d %d",&x,&y); int cnt=(y-2)/(x-2); ans+=cnt; if(cnt>mx) { mx=cnt; t=i; } } printf("%d\n%s",ans,s[t]+1); }

Compilation message (stderr)

go.cpp: In function 'int main()':
go.cpp:35:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ~~~~~^~~~~~~~~
go.cpp:39:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s",s[i]+1);
   ~~~~~^~~~~~~~~~~~~
go.cpp:41:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d",&x,&y);
   ~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...