提出 #7079779


ソースコード 拡げる

#pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
template<class S, class T> inline S max_L(S a,T b){
  return a>=b?a:b;
}
inline void rd(int &x){
  int k, m=0;
  x=0;
  for(;;){
    k = getchar_unlocked();
    if(k=='-'){
      m=1;
      break;
    }
    if('0'<=k&&k<='9'){
      x=k-'0';
      break;
    }
  }
  for(;;){
    k = getchar_unlocked();
    if(k<'0'||k>'9'){
      break;
    }
    x=x*10+k-'0';
  }
  if(m){
    x=-x;
  }
}
inline void wt_L(char a){
  putchar_unlocked(a);
}
inline void wt_L(int x){
  char f[10];
  int m=0, s=0;
  if(x<0){
    m=1;
    x=-x;
  }
  while(x){
    f[s++]=x%10;
    x/=10;
  }
  if(!s){
    f[s++]=0;
  }
  if(m){
    putchar_unlocked('-');
  }
  while(s--){
    putchar_unlocked(f[s]+'0');
  }
}
int main(){
  int A, B, C, res;
  rd(A);
  rd(B);
  rd(C);
  res =max_L(0, C - (A-B));
  wt_L(res);
  wt_L('\n');
  return 0;
}
// cLay varsion 20190822-2

// --- original code ---
// {
//   int A, B, C, res;
//   rd(A, B, C);
//   res = max(0, C - (A-B));
//   wt(res);
// }

提出情報

提出日時
問題 A - Transfer
ユーザ LayCurse
言語 C++14 (GCC 5.4.1)
得点 100
コード長 1122 Byte
結果 AC
実行時間 1 ms
メモリ 256 KiB

ジャッジ結果

セット名 All Sample
得点 / 配点 100 / 100 0 / 0
結果
AC × 13
AC × 3
セット名 テストケース
All sample_01, sample_02, sample_03, testcase_01, testcase_02, testcase_03, testcase_04, testcase_05, testcase_06, testcase_07, testcase_08, testcase_09, testcase_10
Sample sample_01, sample_02, sample_03
ケース名 結果 実行時間 メモリ
sample_01 AC 1 ms 256 KiB
sample_02 AC 1 ms 256 KiB
sample_03 AC 1 ms 256 KiB
testcase_01 AC 1 ms 256 KiB
testcase_02 AC 1 ms 256 KiB
testcase_03 AC 1 ms 256 KiB
testcase_04 AC 1 ms 256 KiB
testcase_05 AC 1 ms 256 KiB
testcase_06 AC 1 ms 256 KiB
testcase_07 AC 1 ms 256 KiB
testcase_08 AC 1 ms 256 KiB
testcase_09 AC 1 ms 256 KiB
testcase_10 AC 1 ms 256 KiB