Submission #3464037
Source Code Expand
#include<stdio.h> #include<stdlib.h> int main() { char s[100]; int i; int n; int x = 0; int max; max = x; scanf("%d%d%d%c",&i,&n,&x,&s[i]); for(i = 0; i <= n; i++) { if(s[i] == 'I') printf("%d = x\n",x++); if(s[i] == 'D') printf("%d = x\n",x--); } printf("%d\n",max); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Increment Decrement |
User | vjudge3 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 309 Byte |
Status | RE |
Exec Time | 99 ms |
Memory | 128 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:11:34: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d%d%c",&i,&n,&x,&s[i]); ^
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | sample_01.txt, sample_02.txt, subtask_1_alld_01.txt, subtask_1_alldmax_01.txt, subtask_1_alli_01.txt, subtask_1_allimax_01.txt, subtask_1_max_01.txt, subtask_1_max_02.txt, subtask_1_rand_01.txt, subtask_1_rand_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | RE | 95 ms | 128 KB |
sample_02.txt | RE | 97 ms | 128 KB |
subtask_1_alld_01.txt | RE | 99 ms | 128 KB |
subtask_1_alldmax_01.txt | RE | 95 ms | 128 KB |
subtask_1_alli_01.txt | RE | 95 ms | 128 KB |
subtask_1_allimax_01.txt | RE | 96 ms | 128 KB |
subtask_1_max_01.txt | RE | 96 ms | 128 KB |
subtask_1_max_02.txt | RE | 96 ms | 128 KB |
subtask_1_rand_01.txt | RE | 96 ms | 128 KB |
subtask_1_rand_02.txt | RE | 95 ms | 128 KB |