Submission #3600278
Source Code Expand
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char input1[50]; char input2[50]; char answer[50]; int i,j,k; int cnt; scanf("%s",input1); scanf("%s",input2); for (i = 0 , cnt = 0 ; i < strlen(input1) ; i++) { if( input1[i] == input2[0]) { for( j = 0 ; j < strlen(input2) ; j++) { if( input1[i+j] == input2[j] || input1[i+j] == '?') { if(j = strlen(input2)-1) { for(k = 0 ; k < strlen(input2) ; k++) { input1[i+k] = input2[k]; } for(k = 0 ; k < strlen(input1) ; k++) { if(input1[k]=='?')input1[k]='a';} printf("%s\n",input1); exit(-1); } continue; } else break; } } } printf("UNRESTORABLE\n"); }
Submission Info
Submission Time | |
---|---|
Task | C - Dubious Document 2 |
User | sshgo |
Language | C (GCC 5.4.1) |
Score | 0 |
Code Size | 769 Byte |
Status | RE |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:12:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s",input1); ^ ./Main.c:13:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s",input2); ^
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 | WA | 1 ms | 128 KB |
in03.txt | AC | 1 ms | 128 KB |
in04.txt | RE | 1 ms | 128 KB |
in05.txt | WA | 1 ms | 128 KB |
in06.txt | RE | 1 ms | 128 KB |
in07.txt | WA | 0 ms | 128 KB |
in08.txt | RE | 1 ms | 128 KB |
in09.txt | WA | 0 ms | 128 KB |
in10.txt | WA | 0 ms | 128 KB |
in11.txt | WA | 1 ms | 128 KB |
in12.txt | AC | 1 ms | 128 KB |
s1.txt | RE | 0 ms | 128 KB |
s2.txt | AC | 0 ms | 128 KB |