結果
| 問題 | 
                            No.88 次はどっちだ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             bal4u
                         | 
                    
| 提出日時 | 2019-06-23 17:50:05 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1 ms / 5,000 ms | 
| コード長 | 640 bytes | 
| コンパイル時間 | 380 ms | 
| コンパイル使用メモリ | 30,080 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-26 14:03:25 | 
| 合計ジャッジ時間 | 1,031 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 11 | 
コンパイルメッセージ
main.c: In function 'ins':
main.c:7:14: warning: implicit declaration of function 'getchar_unlocked' [-Wimplicit-function-declaration]
    7 | #define gc() getchar_unlocked()
      |              ^~~~~~~~~~~~~~~~
main.c:15:17: note: in expansion of macro 'gc'
   15 |         do *s = gc();
      |                 ^~
main.c: In function 'outs':
main.c:8:15: warning: implicit declaration of function 'putchar_unlocked' [-Wimplicit-function-declaration]
    8 | #define pc(c) putchar_unlocked(c)
      |               ^~~~~~~~~~~~~~~~
main.c:20:33: note: in expansion of macro 'pc'
   20 | void outs(char *s) { while (*s) pc(*s++); }
      |                                 ^~
            
            ソースコード
// yukicoder: No.88 次はどっちだ
// 2019.6.23 bal4u
#include <stdio.h>
#if 1
#define gc() getchar_unlocked()
#define pc(c) putchar_unlocked(c)
#else
#define gc() getchar()
#define pc(c) putchar(c)
#endif
void ins(char *s) { // 文字列の入力 スペース以下の文字で入力終了
	do *s = gc();
	while (*s++ > ' ');
	*(s-1) = 0;
}
void outs(char *s) { while (*s) pc(*s++); }
int main()
{
	int r, id, f;
	char s[10], *c;
	char *nm[2] = {"oda\n", "yukiko\n"};
	ins(s);
	id = (*s == 'y');
	f = 0;
	r = 8; while (r--) {
		ins(c = s);
		while (*c) if (*c++ != '.') f++;
	}
	if (f & 1) id = !id;
	outs(nm[id]);
	return 0;
}
            
            
            
        
            
bal4u