Submission #4067822
Source Code Expand
#include<stdio.h> #include<string.h> #define LEN 50 int Mystrcmp(char *a,char *b,int n) { int i; for(i=0;b[i];i++) if(a[i+n]!='?'&&a[i+n]!=b[i]) return 0; return 1; } int main() { char a[LEN],b[LEN]; gets(a); gets(b); int len =strlen(b); int i; for(i=0; a[len+i-1]; i++) if(Mystrcmp(a,b,i)) break; if(a[len+i-1]) { int j; for(j=0;j<len;j++) a[i++]=b[j]; for(j=0;a[j];j++) if(a[j]=='?') a[j] = 'a'; puts(a); } else puts("UNRESTORABLE"); }
Submission Info
Submission Time | |
---|---|
Task | C - Dubious Document 2 |
User | vjudge2 |
Language | C (GCC 5.4.1) |
Score | 0 |
Code Size | 598 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:15:5: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] gets(a); ^ /tmp/ccjODEI1.o: In function `main': Main.c:(.text.startup+0x22): warning: the `gets' function is dangerous and should not be used.
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt |
All | in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, in08.txt, in09.txt, in10.txt, in11.txt, in12.txt, s1.txt, s2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in01.txt | WA | 1 ms | 128 KB |
in02.txt | AC | 1 ms | 128 KB |
in03.txt | AC | 1 ms | 128 KB |
in04.txt | AC | 1 ms | 128 KB |
in05.txt | WA | 1 ms | 128 KB |
in06.txt | AC | 1 ms | 128 KB |
in07.txt | AC | 0 ms | 128 KB |
in08.txt | WA | 1 ms | 128 KB |
in09.txt | AC | 1 ms | 128 KB |
in10.txt | AC | 1 ms | 128 KB |
in11.txt | AC | 1 ms | 128 KB |
in12.txt | AC | 1 ms | 128 KB |
s1.txt | AC | 1 ms | 128 KB |
s2.txt | AC | 1 ms | 128 KB |