Submission #18110521


Source Code Expand

#pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
template<class S, class T> inline S min_L(S a,T b){
  return a<=b?a:b;
}
template<class S, class T> inline S max_L(S a,T b){
  return a>=b?a:b;
}
inline int my_getchar_unlocked(){
  static char buf[1048576];
  static int s = 1048576;
  static int e = 1048576;
  if(s == e && e == 1048576){
    e = fread_unlocked(buf, 1, 1048576, stdin);
    s = 0;
  }
  if(s == e){
    return EOF;
  }
  return buf[s++];
}
inline void rd(int &x){
  int k;
  int m=0;
  x=0;
  for(;;){
    k = my_getchar_unlocked();
    if(k=='-'){
      m=1;
      break;
    }
    if('0'<=k&&k<='9'){
      x=k-'0';
      break;
    }
  }
  for(;;){
    k = my_getchar_unlocked();
    if(k<'0'||k>'9'){
      break;
    }
    x=x*10+k-'0';
  }
  if(m){
    x=-x;
  }
}
struct MY_WRITER{
  char buf[1048576];
  int s;
  int e;
  MY_WRITER(){
    s = 0;
    e = 1048576;
  }
  ~MY_WRITER(){
    if(s){
      fwrite_unlocked(buf, 1, s, stdout);
    }
  }
}
;
MY_WRITER MY_WRITER_VAR;
void my_putchar_unlocked(int a){
  if(MY_WRITER_VAR.s == MY_WRITER_VAR.e){
    fwrite_unlocked(MY_WRITER_VAR.buf, 1, MY_WRITER_VAR.s, stdout);
    MY_WRITER_VAR.s = 0;
  }
  MY_WRITER_VAR.buf[MY_WRITER_VAR.s++] = a;
}
inline void wt_L(char a){
  my_putchar_unlocked(a);
}
inline void wt_L(const char c[]){
  int i=0;
  for(i=0;c[i]!='\0';i++){
    my_putchar_unlocked(c[i]);
  }
}
int main(){
  int A;
  rd(A);
  int B;
  rd(B);
  int C;
  rd(C);
  int mn =min_L(min_L(A, B), C);
  int mx =max_L(max_L(A, B), C);
  if(A != mn && A != mx){
    wt_L("A");
    wt_L('\n');
  }
  if(B != mn && B != mx){
    wt_L("B");
    wt_L('\n');
  }
  if(C != mn && C != mx){
    wt_L("C");
    wt_L('\n');
  }
  return 0;
}
// cLay varsion 20201115-2

// --- original code ---
// {
//   int @A, @B, @C;
//   int mn = min(A,B,C);
//   int mx = max(A,B,C);
//   if(A != mn && A != mx) wt("A");
//   if(B != mn && B != mx) wt("B");
//   if(C != mn && C != mx) wt("C");
// }

Submission Info

Submission Time
Task A - 中央値
User LayCurse
Language C++ (GCC 9.2.1)
Score 9
Code Size 2098 Byte
Status AC
Exec Time 8 ms
Memory 3636 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 9 / 9
Status
AC × 2
AC × 12
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All handmade_00.txt, handmade_01.txt, handmade_02.txt, handmade_03.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
handmade_00.txt AC 8 ms 3464 KiB
handmade_01.txt AC 2 ms 3608 KiB
handmade_02.txt AC 3 ms 3540 KiB
handmade_03.txt AC 2 ms 3568 KiB
random_00.txt AC 3 ms 3524 KiB
random_01.txt AC 2 ms 3636 KiB
random_02.txt AC 2 ms 3592 KiB
random_03.txt AC 2 ms 3596 KiB
random_04.txt AC 2 ms 3528 KiB
random_05.txt AC 4 ms 3552 KiB
sample_01.txt AC 3 ms 3584 KiB
sample_02.txt AC 3 ms 3432 KiB