답안 #1004564

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1004564 2024-06-21T09:52:16 Z vjudge1 말 (IOI15_horses) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
/// author: LilPluton auuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
#define OPT         ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define intt        long long
#define ll          long long
#define pb          push_back
#define arr         array
#define vll         vector<int>
#define fi          first
#define se          second
#define rep(i,j,k)  for(int i = j; i <= k; ++i)
#define all(a)      a.begin(),a.end()
#define pii         pair<int,int>
#define endll       '\n'
using namespace std;
const ll INF = 1e18;
const int N = 305 * 305;
 const int md = 1e9 + 7;
 
 void init(int n,int x[],int y[])
 {
     ll p = 1, ans = 0;
     for(int i = 0; i < n; ++i)
     {
         p *= x[i];
         ans = max(ans, p * y[i] % md);
         p %= md;
     }
     return ans;
 }
 
 int updateX(int pos,int val)
 {
     return 0;
 }
 int updateY(int pos,int val)
 {
     return 0;
 }

Compilation message

horses.cpp: In function 'void init(int, int*, int*)':
horses.cpp:29:13: error: return-statement with a value, in function returning 'void' [-fpermissive]
   29 |      return ans;
      |             ^~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:32:18: warning: unused parameter 'pos' [-Wunused-parameter]
   32 |  int updateX(int pos,int val)
      |              ~~~~^~~
horses.cpp:32:26: warning: unused parameter 'val' [-Wunused-parameter]
   32 |  int updateX(int pos,int val)
      |                      ~~~~^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:36:18: warning: unused parameter 'pos' [-Wunused-parameter]
   36 |  int updateY(int pos,int val)
      |              ~~~~^~~
horses.cpp:36:26: warning: unused parameter 'val' [-Wunused-parameter]
   36 |  int updateY(int pos,int val)
      |                      ~~~~^~~