답안 #1052983

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1052983 2024-08-11T07:13:23 Z modwwe 말 (IOI15_horses) C++17
100 / 100
211 ms 68180 KB
//https://www.instagram.com/_modwwe/
#pragma GCC optimize("Ofast,unroll-loops")
#include<bits/stdc++.h>
#define int2 long long
#define ll long long
#define down cout<<'\n';
#define debug cout<<" cucuucucuuu",down
#define NHP     ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);
#define modwwe  int t;cin>>t; while(t--)
#define bit(i,j) (i>>j&1)
#define sobit(a) __builtin_popcountll(a)
#define task "test"
#define fin(x) freopen(x".inp","r",stdin)
#define fou(x) freopen(x".ans","w",stdout)
#define pb push_back
#define checktime   cerr << (double)clock() / CLOCKS_PER_SEC * 1000  << " ms";
using namespace std;
void phongbeo();
const ll inf=1e18;
const int2 mod2=1e9+7;
const int2  mod1=998244353;
struct icd
{
    long double a;
    int b;
};
struct ib
{
    ll a;
    ll b;
};
struct ic
{
    int a,b,c;
};
struct id
{
    int a,b,c,d;
};
struct ie
{
    int a,b,c,d,e;

};

int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
int2  i,s10,s12;
int2 kk;
int2 el=29;

set<int2> s;
int2 a[500001];
int2 b[500001];
struct IT
{    int2 t[2000001];

     void build(int node,int l,int r)
      {
           if(l==r){t[node]=a[l]; return;}
           int mid=l+r>>1;
            build(node<<1,l,mid);
            build(node<<1|1,mid+1,r);
             t[node]=(t[node<<1]*t[node<<1|1])%mod2;
      }
      void upd(int node,int l,int r,int l1)
      {
           if(l==r){t[node]=a[l]; return;}
           int mid=l+r>>1;
            if(l1<=mid)upd(node<<1,l,mid,l1);
             else upd(node<<1|1,mid+1,r,l1);
              t[node]=(t[node<<1]*t[node<<1|1])%mod2;
      }
      int2 get(int node,int l,int r,int l1,int r1)
        {
             if(l>r1||r<l1) return 1;
             if(l>=l1&&r<=r1) return t[node];
              int mid=l+r>>1;
               return get(node<<1,l,mid,l1,r1)*get(node<<1|1,mid+1,r,l1,r1)%mod2;
        }
}st;
struct IT2{
    int2 t[2000001];
void build(int node,int l,int r)
      {
           if(l==r){t[node]=b[l]; return;}
           int mid=l+r>>1;
            build(node<<1,l,mid);
            build(node<<1|1,mid+1,r);
             t[node]=max(t[node<<1],t[node<<1|1]);
      }
      void upd(int node,int l,int r,int l1)
      {
           if(l==r){t[node]=b[l]; return;}
           int mid=l+r>>1;
            if(l1<=mid)upd(node<<1,l,mid,l1);
             else upd(node<<1|1,mid+1,r,l1);
             t[node]=max(t[node<<1],t[node<<1|1]);
      }
      int2 get(int node,int l,int r,int l1,int r1)
        {
             if(l>r1||r<l1) return 1;
             if(l>=l1&&r<=r1) return t[node];
              int mid=l+r>>1;
               return max(get(node<<1,l,mid,l1,r1),get(node<<1|1,mid+1,r,l1,r1));
        }
}st2;
void setup()
 {
      for(int i=n;i>=1;--i)
         if(a[i]!=1)
          s.insert(i);
          s.insert(1);
        auto x=s.end();
        x--;
        s2=0;
        s5=n;
        while(1)
        {
            s6=st2.get(1,1,n,*x,s5);
            if(s6>s2) s3=*x,s2=s6,s8=s6;
         s2=s2*a[*x];
         s5=*x-1;
         if(x==s.begin()) break;
x--;
          if(s2>1e9) break;
        }
 }
 void setup2()
 {
       auto x=s.end();
                 s.insert(1);
        x--;
        s2=0;
        s5=n;
        s3=0;
        s8=0;
        while(1)
        {
            s6=st2.get(1,1,n,*x,s5);
            if(s6>s2) s3=*x,s2=s6,s8=s6;
         s2=s2*a[*x];
         s5=*x-1;
         if(x==s.begin()) break;
x--;
          if(s2>1e9) break;
        }
 }
int init(int N,int X[],int Y[])
{
n=N;
   for(int i=1;i<=n;i++)
    a[i]=X[i-1];
    for(int i=1;i<=n;i++)
         b[i]=Y[i-1];
     st.build(1,1,n);
     st2.build(1,1,n);
     setup();
s3=s8*st.get(1,1,n,1,s3)%mod2;
 return s3;
}
int updateY(int pos, int val)
{
    l=pos;
    r=val;
      l++;
    b[l]=r;
    st2.upd(1,1,n,l);
    setup2();
    s3=(s8*st.get(1,1,n,1,s3))%mod2;
 return s3;
}
int updateX(int pos, int val)
{
    l=pos;
    r=val;
     l++;
         if(a[l]!=1&&r==1) s.erase(l);
          if(a[l]==1&&r!=1) s.insert(l);
          a[l]=r;
           st.upd(1,1,n,l);
           setup2();
           s3=(s8*st.get(1,1,n,1,s3))%mod2;
 return s3;
}

Compilation message

horses.cpp: In member function 'void IT::build(int, int, int)':
horses.cpp:57:36: warning: declaration of 'r' shadows a global declaration [-Wshadow]
   57 |      void build(int node,int l,int r)
      |                                ~~~~^
horses.cpp:46:77: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                             ^
horses.cpp:57:30: warning: declaration of 'l' shadows a global declaration [-Wshadow]
   57 |      void build(int node,int l,int r)
      |                          ~~~~^
horses.cpp:46:75: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                           ^
horses.cpp:60:16: warning: declaration of 'mid' shadows a global declaration [-Wshadow]
   60 |            int mid=l+r>>1;
      |                ^~~
horses.cpp:46:79: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                               ^~~
horses.cpp:60:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   60 |            int mid=l+r>>1;
      |                    ~^~
horses.cpp: In member function 'void IT::upd(int, int, int, int)':
horses.cpp:65:35: warning: declaration of 'r' shadows a global declaration [-Wshadow]
   65 |       void upd(int node,int l,int r,int l1)
      |                               ~~~~^
horses.cpp:46:77: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                             ^
horses.cpp:65:29: warning: declaration of 'l' shadows a global declaration [-Wshadow]
   65 |       void upd(int node,int l,int r,int l1)
      |                         ~~~~^
horses.cpp:46:75: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                           ^
horses.cpp:68:16: warning: declaration of 'mid' shadows a global declaration [-Wshadow]
   68 |            int mid=l+r>>1;
      |                ^~~
horses.cpp:46:79: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                               ^~~
horses.cpp:68:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   68 |            int mid=l+r>>1;
      |                    ~^~
horses.cpp: In member function 'long long int IT::get(int, int, int, int, int)':
horses.cpp:73:35: warning: declaration of 'r' shadows a global declaration [-Wshadow]
   73 |       int2 get(int node,int l,int r,int l1,int r1)
      |                               ~~~~^
horses.cpp:46:77: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                             ^
horses.cpp:73:29: warning: declaration of 'l' shadows a global declaration [-Wshadow]
   73 |       int2 get(int node,int l,int r,int l1,int r1)
      |                         ~~~~^
horses.cpp:46:75: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                           ^
horses.cpp:77:19: warning: declaration of 'mid' shadows a global declaration [-Wshadow]
   77 |               int mid=l+r>>1;
      |                   ^~~
horses.cpp:46:79: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                               ^~~
horses.cpp:77:24: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   77 |               int mid=l+r>>1;
      |                       ~^~
horses.cpp: In member function 'void IT2::build(int, int, int)':
horses.cpp:83:31: warning: declaration of 'r' shadows a global declaration [-Wshadow]
   83 | void build(int node,int l,int r)
      |                           ~~~~^
horses.cpp:46:77: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                             ^
horses.cpp:83:25: warning: declaration of 'l' shadows a global declaration [-Wshadow]
   83 | void build(int node,int l,int r)
      |                     ~~~~^
horses.cpp:46:75: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                           ^
horses.cpp:86:16: warning: declaration of 'mid' shadows a global declaration [-Wshadow]
   86 |            int mid=l+r>>1;
      |                ^~~
horses.cpp:46:79: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                               ^~~
horses.cpp:86:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   86 |            int mid=l+r>>1;
      |                    ~^~
horses.cpp: In member function 'void IT2::upd(int, int, int, int)':
horses.cpp:91:35: warning: declaration of 'r' shadows a global declaration [-Wshadow]
   91 |       void upd(int node,int l,int r,int l1)
      |                               ~~~~^
horses.cpp:46:77: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                             ^
horses.cpp:91:29: warning: declaration of 'l' shadows a global declaration [-Wshadow]
   91 |       void upd(int node,int l,int r,int l1)
      |                         ~~~~^
horses.cpp:46:75: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                           ^
horses.cpp:94:16: warning: declaration of 'mid' shadows a global declaration [-Wshadow]
   94 |            int mid=l+r>>1;
      |                ^~~
horses.cpp:46:79: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                               ^~~
horses.cpp:94:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   94 |            int mid=l+r>>1;
      |                    ~^~
horses.cpp: In member function 'long long int IT2::get(int, int, int, int, int)':
horses.cpp:99:35: warning: declaration of 'r' shadows a global declaration [-Wshadow]
   99 |       int2 get(int node,int l,int r,int l1,int r1)
      |                               ~~~~^
horses.cpp:46:77: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                             ^
horses.cpp:99:29: warning: declaration of 'l' shadows a global declaration [-Wshadow]
   99 |       int2 get(int node,int l,int r,int l1,int r1)
      |                         ~~~~^
horses.cpp:46:75: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                           ^
horses.cpp:103:19: warning: declaration of 'mid' shadows a global declaration [-Wshadow]
  103 |               int mid=l+r>>1;
      |                   ^~~
horses.cpp:46:79: note: shadowed declaration is here
   46 | int2 n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,l,r,mid;
      |                                                                               ^~~
horses.cpp:103:24: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  103 |               int mid=l+r>>1;
      |                       ~^~
horses.cpp: In function 'void setup()':
horses.cpp:109:15: warning: declaration of 'i' shadows a global declaration [-Wshadow]
  109 |       for(int i=n;i>=1;--i)
      |               ^
horses.cpp:47:7: note: shadowed declaration is here
   47 | int2  i,s10,s12;
      |       ^
horses.cpp:109:17: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  109 |       for(int i=n;i>=1;--i)
      |                 ^
horses.cpp:110:10: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  110 |          if(a[i]!=1)
      |          ^~
horses.cpp:112:11: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  112 |           s.insert(1);
      |           ^
horses.cpp:119:28: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  119 |             s6=st2.get(1,1,n,*x,s5);
      |                            ^
horses.cpp:119:30: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  119 |             s6=st2.get(1,1,n,*x,s5);
      |                              ^~
horses.cpp:119:33: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  119 |             s6=st2.get(1,1,n,*x,s5);
      |                                 ^~
horses.cpp:125:14: warning: conversion from 'long long int' to 'double' may change value [-Wconversion]
  125 |           if(s2>1e9) break;
      |              ^~
horses.cpp: In function 'void setup2()':
horses.cpp:139:28: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  139 |             s6=st2.get(1,1,n,*x,s5);
      |                            ^
horses.cpp:139:30: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  139 |             s6=st2.get(1,1,n,*x,s5);
      |                              ^~
horses.cpp:139:33: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  139 |             s6=st2.get(1,1,n,*x,s5);
      |                                 ^~
horses.cpp:145:14: warning: conversion from 'long long int' to 'double' may change value [-Wconversion]
  145 |           if(s2>1e9) break;
      |              ^~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:151:12: warning: declaration of 'i' shadows a global declaration [-Wshadow]
  151 |    for(int i=1;i<=n;i++)
      |            ^
horses.cpp:47:7: note: shadowed declaration is here
   47 | int2  i,s10,s12;
      |       ^
horses.cpp:151:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  151 |    for(int i=1;i<=n;i++)
      |    ^~~
horses.cpp:153:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  153 |     for(int i=1;i<=n;i++)
      |     ^~~
horses.cpp:153:13: warning: declaration of 'i' shadows a global declaration [-Wshadow]
  153 |     for(int i=1;i<=n;i++)
      |             ^
horses.cpp:47:7: note: shadowed declaration is here
   47 | int2  i,s10,s12;
      |       ^
horses.cpp:155:19: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  155 |      st.build(1,1,n);
      |                   ^
horses.cpp:156:20: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  156 |      st2.build(1,1,n);
      |                    ^
horses.cpp:158:18: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  158 | s3=s8*st.get(1,1,n,1,s3)%mod2;
      |                  ^
horses.cpp:158:22: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  158 | s3=s8*st.get(1,1,n,1,s3)%mod2;
      |                      ^~
horses.cpp:159:9: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  159 |  return s3;
      |         ^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:167:17: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  167 |     st2.upd(1,1,n,l);
      |                 ^
horses.cpp:167:19: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  167 |     st2.upd(1,1,n,l);
      |                   ^
horses.cpp:169:23: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  169 |     s3=(s8*st.get(1,1,n,1,s3))%mod2;
      |                       ^
horses.cpp:169:27: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  169 |     s3=(s8*st.get(1,1,n,1,s3))%mod2;
      |                           ^~
horses.cpp:170:9: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  170 |  return s3;
      |         ^~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:180:23: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  180 |            st.upd(1,1,n,l);
      |                       ^
horses.cpp:180:25: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  180 |            st.upd(1,1,n,l);
      |                         ^
horses.cpp:182:30: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  182 |            s3=(s8*st.get(1,1,n,1,s3))%mod2;
      |                              ^
horses.cpp:182:34: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  182 |            s3=(s8*st.get(1,1,n,1,s3))%mod2;
      |                                  ^~
horses.cpp:183:9: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  183 |  return s3;
      |         ^~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6744 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 6492 KB Output is correct
4 Correct 1 ms 6488 KB Output is correct
5 Correct 1 ms 6496 KB Output is correct
6 Correct 1 ms 6496 KB Output is correct
7 Correct 1 ms 6492 KB Output is correct
8 Correct 1 ms 6496 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 0 ms 6588 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 0 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 1 ms 6492 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 6492 KB Output is correct
2 Correct 1 ms 6588 KB Output is correct
3 Correct 0 ms 6492 KB Output is correct
4 Correct 1 ms 6492 KB Output is correct
5 Correct 1 ms 6492 KB Output is correct
6 Correct 1 ms 6492 KB Output is correct
7 Correct 1 ms 6492 KB Output is correct
8 Correct 1 ms 6576 KB Output is correct
9 Correct 1 ms 6496 KB Output is correct
10 Correct 1 ms 6496 KB Output is correct
11 Correct 0 ms 6492 KB Output is correct
12 Correct 1 ms 6584 KB Output is correct
13 Correct 1 ms 6500 KB Output is correct
14 Correct 0 ms 6492 KB Output is correct
15 Correct 0 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6588 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 1 ms 6584 KB Output is correct
21 Correct 1 ms 6492 KB Output is correct
22 Correct 1 ms 6492 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6488 KB Output is correct
25 Correct 1 ms 6600 KB Output is correct
26 Correct 1 ms 6492 KB Output is correct
27 Correct 2 ms 6492 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 2 ms 6492 KB Output is correct
30 Correct 1 ms 6492 KB Output is correct
31 Correct 1 ms 6644 KB Output is correct
32 Correct 1 ms 6492 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 211 ms 59272 KB Output is correct
2 Correct 152 ms 68176 KB Output is correct
3 Correct 138 ms 59280 KB Output is correct
4 Correct 138 ms 63148 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6492 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 0 ms 6492 KB Output is correct
4 Correct 1 ms 6492 KB Output is correct
5 Correct 1 ms 6492 KB Output is correct
6 Correct 1 ms 6492 KB Output is correct
7 Correct 1 ms 6492 KB Output is correct
8 Correct 1 ms 6488 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6572 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 0 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6488 KB Output is correct
17 Correct 0 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 0 ms 6492 KB Output is correct
20 Correct 1 ms 6492 KB Output is correct
21 Correct 0 ms 6492 KB Output is correct
22 Correct 1 ms 6492 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 6492 KB Output is correct
26 Correct 1 ms 6492 KB Output is correct
27 Correct 2 ms 6492 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 1 ms 6492 KB Output is correct
31 Correct 1 ms 6492 KB Output is correct
32 Correct 1 ms 6492 KB Output is correct
33 Correct 23 ms 35412 KB Output is correct
34 Correct 22 ms 35160 KB Output is correct
35 Correct 113 ms 65628 KB Output is correct
36 Correct 125 ms 65364 KB Output is correct
37 Correct 32 ms 33320 KB Output is correct
38 Correct 53 ms 46132 KB Output is correct
39 Correct 17 ms 33112 KB Output is correct
40 Correct 102 ms 60500 KB Output is correct
41 Correct 21 ms 33148 KB Output is correct
42 Correct 25 ms 33372 KB Output is correct
43 Correct 96 ms 60880 KB Output is correct
44 Correct 93 ms 61004 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6492 KB Output is correct
2 Correct 0 ms 6492 KB Output is correct
3 Correct 1 ms 6492 KB Output is correct
4 Correct 1 ms 6492 KB Output is correct
5 Correct 1 ms 6492 KB Output is correct
6 Correct 1 ms 6588 KB Output is correct
7 Correct 1 ms 6492 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6492 KB Output is correct
18 Correct 1 ms 6588 KB Output is correct
19 Correct 0 ms 6492 KB Output is correct
20 Correct 1 ms 6492 KB Output is correct
21 Correct 1 ms 6492 KB Output is correct
22 Correct 1 ms 6492 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 6492 KB Output is correct
26 Correct 1 ms 6492 KB Output is correct
27 Correct 2 ms 6656 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 2 ms 6744 KB Output is correct
31 Correct 1 ms 6492 KB Output is correct
32 Correct 1 ms 6492 KB Output is correct
33 Correct 211 ms 59452 KB Output is correct
34 Correct 151 ms 68180 KB Output is correct
35 Correct 138 ms 59300 KB Output is correct
36 Correct 141 ms 63100 KB Output is correct
37 Correct 23 ms 35160 KB Output is correct
38 Correct 21 ms 35132 KB Output is correct
39 Correct 112 ms 65468 KB Output is correct
40 Correct 121 ms 65384 KB Output is correct
41 Correct 32 ms 33372 KB Output is correct
42 Correct 53 ms 46160 KB Output is correct
43 Correct 17 ms 33104 KB Output is correct
44 Correct 100 ms 60496 KB Output is correct
45 Correct 26 ms 33372 KB Output is correct
46 Correct 26 ms 33328 KB Output is correct
47 Correct 96 ms 61012 KB Output is correct
48 Correct 100 ms 60972 KB Output is correct
49 Correct 83 ms 38224 KB Output is correct
50 Correct 54 ms 38152 KB Output is correct
51 Correct 174 ms 67412 KB Output is correct
52 Correct 155 ms 66896 KB Output is correct
53 Correct 200 ms 36432 KB Output is correct
54 Correct 116 ms 50004 KB Output is correct
55 Correct 58 ms 34140 KB Output is correct
56 Correct 152 ms 62552 KB Output is correct
57 Correct 108 ms 34944 KB Output is correct
58 Correct 153 ms 35408 KB Output is correct
59 Correct 98 ms 61012 KB Output is correct