結果
問題 | No.88 次はどっちだ |
ユーザー |
![]() |
提出日時 | 2015-12-28 23:22:17 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 385 bytes |
コンパイル時間 | 185 ms |
コンパイル使用メモリ | 33,488 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 08:02:26 |
合計ジャッジ時間 | 922 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%s",in); | ~~~~~^~~~~~~~~ main.cpp:8:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | for(int i=0;i<8;i++)scanf("%s",str[i]); | ~~~~~^~~~~~~~~~~~~
ソースコード
#include<stdio.h>#include<algorithm>using namespace std;char in[20];char str[20][20];int main(){scanf("%s",in);for(int i=0;i<8;i++)scanf("%s",str[i]);int cnt=0;for(int i=0;i<8;i++)for(int j=0;j<8;j++)if(str[i][j]!='.')cnt++;if(cnt%2){if(in[0]=='o')printf("yukiko\n");else printf("oda\n");}else{if(in[0]=='y')printf("yukiko\n");else printf("oda\n");}}