提出 #19625787


ソースコード 拡げる

Copy
#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
template<class T> bool chmax(T &a, const T &b) { if(a<b){a=b;return 1;}return 0;}
template<class T> bool chmin(T &a, const T &b) { if(a>b){a=b;return 1;}return 0;}
//-------------------------------------------------------

string S;

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>S;
	if(S[0]==S[1]&&S[1]==S[2]) {
		cout<<"Won"<<endl;
	}
	else {
		cout<<"Lost"<<endl;
	}
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}

提出情報

提出日時
問題 A - Slot
ユーザ kmjp
言語 C++ (GCC 9.2.1)
得点 100
コード長 993 Byte
結果 AC
実行時間 4 ms
メモリ 3556 KB

コンパイルエラー

./Main.cpp: In function ‘void solve()’:
./Main.cpp:19:6: warning: unused variable ‘i’ [-Wunused-variable]
   19 |  int i,j,k,l,r,x,y; string s;
      |      ^
./Main.cpp:19:8: warning: unused variable ‘j’ [-Wunused-variable]
   19 |  int i,j,k,l,r,x,y; string s;
      |        ^
./Main.cpp:19:10: warning: unused variable ‘k’ [-Wunused-variable]
   19 |  int i,j,k,l,r,x,y; string s;
      |          ^
./Main.cpp:19:12: warning: unused variable ‘l’ [-Wunused-variable]
   19 |  int i,j,k,l,r,x,y; string s;
      |            ^
./Main.cpp:19:14: warning: unused variable ‘r’ [-Wunused-variable]
   19 |  int i,j,k,l,r,x,y; string s;
      |              ^
./Main.cpp:19:16: warning: unused variable ‘x’ [-Wunused-variable]
   19 |  int i,j,k,l,r,x,y; string s;
      |                ^
./Main.cpp:19:18: warning: unused variable ‘y’ [-Wunused-variable]
   19 |  int i,j,k,l,r,x,y; string s;
      |                  ^
./Main.cpp: In function ‘int main(int, char**)’:
./Main.cpp:6:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
    6 | #define FOR(x,to) for(x=0;x<(to);x++)
      |                            ^
./Main.cpp:34:38: note: in expansion of macro ‘FOR’
   34 |  FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
      |                                      ^~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 2
AC × 19
セット名 テストケース
Sample sample_01.txt, sample_02.txt
All hand_01.txt, hand_02.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, sample_01.txt, sample_02.txt
ケース名 結果 実行時間 メモリ
hand_01.txt AC 4 ms 3528 KB
hand_02.txt AC 4 ms 3480 KB
random_01.txt AC 4 ms 3464 KB
random_02.txt AC 4 ms 3512 KB
random_03.txt AC 2 ms 3460 KB
random_04.txt AC 2 ms 3488 KB
random_05.txt AC 3 ms 3512 KB
random_06.txt AC 2 ms 3476 KB
random_07.txt AC 2 ms 3468 KB
random_08.txt AC 4 ms 3488 KB
random_09.txt AC 2 ms 3424 KB
random_10.txt AC 3 ms 3480 KB
random_11.txt AC 3 ms 3520 KB
random_12.txt AC 2 ms 3512 KB
random_13.txt AC 3 ms 3468 KB
random_14.txt AC 4 ms 3512 KB
random_15.txt AC 2 ms 3556 KB
sample_01.txt AC 2 ms 3488 KB
sample_02.txt AC 2 ms 3512 KB