Submission #705333

#TimeUsernameProblemLanguageResultExecution timeMemory
705333bin9638Horses (IOI15_horses)C++17
17 / 100
14 ms10508 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define fs first #define sc second #define N 100010 #define pb push_back #define ii pair<int,int> const ll mod=1e9+7; ll updateX(int pos, int val) { } ll updateY(int pos, int val) { } ll init(int n,int x[],int y[]) { ll res=0,cnt=1; for(int i=0;i<n;i++) { cnt*=x[i]; res=max(res,cnt*y[i]); } return res; } #ifdef SKY int main() { freopen("A.inp","r",stdin); freopen("A.out","w",stdout); int n; cin>>n; int x[n],y[n]; for(int i=0;i<n;i++) cin>>x[i]; for(int i=0;i<n;i++) cin>>y[i]; cout<<init(n,x,y); return 0; } #endif // SKY

Compilation message (stderr)

horses.cpp: In function 'long long int updateX(int, int)':
horses.cpp:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
   17 | }
      | ^
horses.cpp:14:16: warning: unused parameter 'pos' [-Wunused-parameter]
   14 | ll updateX(int pos, int val)
      |            ~~~~^~~
horses.cpp:14:25: warning: unused parameter 'val' [-Wunused-parameter]
   14 | ll updateX(int pos, int val)
      |                     ~~~~^~~
horses.cpp: In function 'long long int updateY(int, int)':
horses.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
   22 | }
      | ^
horses.cpp:19:17: warning: unused parameter 'pos' [-Wunused-parameter]
   19 | ll  updateY(int pos, int val)
      |             ~~~~^~~
horses.cpp:19:26: warning: unused parameter 'val' [-Wunused-parameter]
   19 | ll  updateY(int pos, int val)
      |                      ~~~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...