Submission #541211

#TimeUsernameProblemLanguageResultExecution timeMemory
541211new_acc말 (IOI15_horses)C++14
17 / 100
34 ms4432 KiB
#include<bits/stdc++.h> #define fi first #define se second #define pitem item* using namespace std; typedef unsigned long long ll; typedef vector<int> vi; typedef vector<ll> vl; const int N=5e5+10; const ll mod=1e9+7; int t[N]; int init(int n,int x[],int y[]){ int g=0; ll curr=0,akt=1; for(int i=0;i<n;i++){ akt*=(ll)x[i]; if(akt*(ll)y[i]>curr){ curr=y[i],akt=1; g=i; } } ll res=1; for(int i=0;i<=g;i++) (res=res*(ll)x[i])%=mod; (res*=(ll)y[g])%=mod; return res; } int updateX(int pos,int val){ return 0; } int updateY(int pos,int val){ return 0; }

Compilation message (stderr)

horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:25:12: warning: conversion from 'll' {aka 'long long unsigned int'} to 'int' may change value [-Wconversion]
   25 |     return res;
      |            ^~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:27:17: warning: unused parameter 'pos' [-Wunused-parameter]
   27 | int updateX(int pos,int val){
      |             ~~~~^~~
horses.cpp:27:25: warning: unused parameter 'val' [-Wunused-parameter]
   27 | int updateX(int pos,int val){
      |                     ~~~~^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:30:17: warning: unused parameter 'pos' [-Wunused-parameter]
   30 | int updateY(int pos,int val){
      |             ~~~~^~~
horses.cpp:30:25: warning: unused parameter 'val' [-Wunused-parameter]
   30 | 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...