結果

問題 No.2525 Great Move
コンテスト
ユーザー nekoti
提出日時 2023-11-03 21:31:29
言語 C11(gcc12 gnu拡張)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=gnu11 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 288 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 440 ms
コンパイル使用メモリ 31,080 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-03-08 16:35:57
合計ジャッジ時間 1,463 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:12: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
    7 |   int hlen=strlen(h);
      |            ^~~~~~
main.c:2:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(void)
main.c:7:12: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
    7 |   int hlen=strlen(h);
      |            ^~~~~~
main.c:7:12: note: include ‘<string.h>’ or provide a declaration of ‘strlen’

ソースコード

diff #
raw source code

#include<stdio.h>
int main(void)
{
  int scan;//scanf警告用
  char h[200010],s[200010];
  scan=scanf("%s %s",h,s);
  int hlen=strlen(h);
  int slen=strlen(s);
  int hh=h[hlen-1]-'0';
  int ss=s[slen-1]-'0';
  if(hh%2==ss%2)printf("Possible");
  else printf("Impossible");
  return 0;
}
0