結果

問題 No.331 CodeRunnerでやれ
ユーザー itezpaceitezpace
提出日時 2016-10-14 06:49:31
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 751 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 52,948 KB
実行使用メモリ 82,112 KB
平均クエリ数 0.06
最終ジャッジ日時 2023-09-23 11:35:09
合計ジャッジ時間 8,449 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;
int main(){
  int d=0,f_i=0,f_w=0;
  while(1){
    string s1,s2;cin>>s1;
    if(s1=="Merry Christmas!") break;
    if(s1=="20151224"){
      s2="F";
      cout<<s2<<endl;
      continue;
    }
    int a=stoi(s1);
    if(f_i==0 && a!=0){
      s2="F";
      continue;
    } else if(f_i==0 && a==0){
      f_i=1;
    }
    if(f_w==0 && a==0){
      s2="R";
      cout<<s2<<endl;
      f_w=1;
      continue;
    } else if(f_w==0 && a!=0){
      s2="L";
      cout<<s2<<endl;
      f_w=1;
      continue;
    } else if(f_w!=0 && a==0){
      s2="R";
      cout<<s2<<endl;
      continue;
    } else if(f_w!=0 && a!=0){
      s2="F";
      cout<<s2<<endl;
      f_w=0;
      continue;
    }
  }
}
0