結果
| 問題 |
No.591 (^o^)/
|
| コンテスト | |
| ユーザー |
cnyanko1
|
| 提出日時 | 2017-11-23 17:50:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 230 bytes |
| コンパイル時間 | 246 ms |
| コンパイル使用メモリ | 22,912 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-27 05:52:26 |
| 合計ジャッジ時間 | 2,300 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
10 | e=strcat("(",d);
| ^~~
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%c",a);
| ~~~~~^~~~~~~~
main.cpp:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%c",b);
| ~~~~~^~~~~~~~
main.cpp:6:10: warning: ‘a’ is used uninitialized [-Wuninitialized]
6 | scanf("%c",a);
| ~~~~~^~~~~~~~
main.cpp:7:10: warning: ‘b’ is used uninitialized [-Wuninitialized]
7 | scanf("%c",b);
| ~~~~~^~~~~~~~
In file included from /usr/include/string.h:535,
from main.cpp:2:
In function ‘char* strcat(char*, const char*)’,
inlined from ‘int main()’ at main.cpp:11:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:130:33: warning: ‘char* __builtin___strcat_chk(char*, const char*, long unsigned int)’ writing 3 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
130 | return __builtin___strcat_chk (__dest, __src, __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<string.h>
int main(void){
char *a,*b,*c,*d,*e,*f;
scanf("%c",a);
scanf("%c",b);
c=strncat(a,b,1);
d=strncat(c,a,1);
e=strcat("(",d);
f=strcat(e,")/");
puts(f);
return 0;
}
cnyanko1