Submission #708271

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7082712023-03-11 13:40:42Alihan_8Horses (IOI15_horses)C++17
17 / 100
1582 ms10196 KiB
#include <bits/stdc++.h>
#include "horses.h"
#define Flag false
// include <ext/pb_ds/assoc_container.hpp>
// include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define all(x) x.begin(), x.end()
#define pb push_back
// define ordered_set tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
#define mpr make_pair
#define ln '\n'
void IO(string name){freopen((name+".in").c_str(),"r",stdin); freopen((name+".out").c_str(),"w",stdout);}
//#define int long long
typedef long long ll;
const ll Mod = 1e9+7;
vector <int> x, y;
bool chmax(int &x, int y){
bool flag = false;
if ( x < y ){
x = y; flag |= true;
}
return flag;
}
int F(){
int n = (int)x.size(), it = 0;
auto large = [&](int pos){
int val = y[it];
val /= y[pos];
for ( int i = it+1; i <= pos; i++ ){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

horses.cpp: In function 'bool chmax(int&, int)':
horses.cpp:18:24: warning: declaration of 'y' shadows a global declaration [-Wshadow]
   18 | bool chmax(int &x, int y){
      |                    ~~~~^
horses.cpp:17:17: note: shadowed declaration is here
   17 | vector <int> x, y;
      |                 ^
horses.cpp:18:17: warning: declaration of 'x' shadows a global declaration [-Wshadow]
   18 | bool chmax(int &x, int y){
      |            ~~~~~^
horses.cpp:17:14: note: shadowed declaration is here
   17 | vector <int> x, y;
      |              ^
horses.cpp: In function 'int F()':
horses.cpp:40:21: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
   40 |     return res*y[it]%Mod;
      |            ~~~~~~~~~^~~~
horses.cpp: In function 'void IO(std::string)':
horses.cpp:13:29: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 | void IO(string name){freopen((name+".in").c_str(),"r",stdin); freopen((name+".out").c_str(),"w",stdout);}
      |                      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
horses.cpp:13:70: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 | void IO(string name){freopen((name+".in").c_str(),"r",stdin); freopen((name+".out").c_str(),"w",stdout);}
      |                                                               ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#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...