結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-03-14 09:57:18 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 280 bytes |
| コンパイル時間 | 450 ms |
| コンパイル使用メモリ | 27,776 KB |
| 実行使用メモリ | 7,328 KB |
| 最終ジャッジ日時 | 2025-03-14 09:57:21 |
| 合計ジャッジ時間 | 2,282 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 16 WA * 16 RE * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%s%s",str1,str2);
| ~~~~~^~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
int main(){
char str1[10],str2[10];
scanf("%s%s",str1,str2);
int len = strlen(str1);
for(int i = 0;i < len;i++){
if(str1[i] != '.'){
if((int)str1[i] > (int)str2[i]){
printf("YES");
return 0;
}
}
}
printf("NO");
}
sasa