제출 #645987

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
6459872022-09-28 11:44:02NintsiChkhaidze말 (IOI15_horses)C++14
100 / 100
1160 ms50256 KiB
#include "horses.h"
#include <bits/stdc++.h>
#define ll long long
#define s second
#define f first
#define pb push_back
#define left (h<<1),l,(l+r)>>1
#define right ((h<<1)|1),((l+r)>>1) + 1,r
using namespace std;
const int mod = 1000000007,N = 500005;
ll x[N],y[N],ans;
int n;
struct {
ll nam;
ll maxy;
int id;
//id = (l,r) shualedshi 1sgan(x[i]) gansxvavebuli sul marjvena ricxvis indexi
} t[4*N];
void upd(int h,int l,int r,int idx){
if (l == r){
t[h].id = 0;
if (x[l] != 1) t[h].id = l;
t[h].nam = x[l];
t[h].maxy = y[l];
return;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

horses.cpp: In function 'long long int getid(int, int, int, int, int)':
horses.cpp:56:16: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   56 |   int X = getid(left,L,R),Y = getid(right,L,R);
      |           ~~~~~^~~~~~~~~~
horses.cpp:56:36: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   56 |   int X = getid(left,L,R),Y = getid(right,L,R);
      |                               ~~~~~^~~~~~~~~~~
horses.cpp: In function 'void go()':
horses.cpp:79:32: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   79 |     int res = getid(1,1,n,1,r) + 1;
      |               ~~~~~~~~~~~~~~~~~^~~
horses.cpp:88:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   88 |   for (int j = 1; j<vec.size(); j++){
      |                   ~^~~~~~~~~~~
horses.cpp:91:15: warning: conversion from 'long long int' to 'double' may change value [-Wconversion]
   91 |     if (!q && k < 1e9) k *= X;
      |               ^
horses.cpp:92:9: warning: conversion from 'long long int' to 'double' may change value [-Wconversion]
   92 |     if (k >= 1e9) q=1;
      |         ^
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:104:14: warning: declaration of 'N' shadows a global declaration [-Wshadow]
  104 | int init(int N, int X[], int Y[]) {
      |          ~~~~^
horses.cpp:11:28: note: shadowed declaration is here
   11 | const int mod = 1000000007,N = 500005;
      |                            ^
horses.cpp:110:9: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  110 |  return ans;
      |         ^~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:118:9: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  118 |  return ans;
      |         ^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:126:9: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  126 |  return ans;
      |         ^~~
#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...