Submission #747316

#TimeUsernameProblemLanguageResultExecution timeMemory
747316Desh03말 (IOI15_horses)C++17
17 / 100
23 ms10632 KiB
#include "horses.h"
#include <bits/stdc++.h>
using namespace std;

const int mod = 1000000007;

int init(int n,int x[], int y[]) {
    vector<int> p(n);
    p[0] = x[0];
    for (int i = 1; i < n; i++) p[i] = p[i - 1] * x[i];
    int ans = 0;
    for (int i = 0; i < n; i++) ans = max(ans, p[i] * y[i]);
    return ans % mod;
}

int updateX(int pos, int val) {

}

int updateY(int pos, int val) {

}

Compilation message (stderr)

horses.cpp: In function 'int updateX(int, int)':
horses.cpp:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
   18 | }
      | ^
horses.cpp:16:17: warning: unused parameter 'pos' [-Wunused-parameter]
   16 | int updateX(int pos, int val) {
      |             ~~~~^~~
horses.cpp:16:26: warning: unused parameter 'val' [-Wunused-parameter]
   16 | int updateX(int pos, int val) {
      |                      ~~~~^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
   22 | }
      | ^
horses.cpp:20:17: warning: unused parameter 'pos' [-Wunused-parameter]
   20 | int updateY(int pos, int val) {
      |             ~~~~^~~
horses.cpp:20:26: warning: unused parameter 'val' [-Wunused-parameter]
   20 | int 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...