답안 #116811

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
116811 2019-06-14T01:30:32 Z ntrung03 Lozinke (COCI17_lozinke) C
45 / 100
1000 ms 512 KB
#pragma Ofast
#include <stdio.h>
#include <string.h>
char s[20002][12];
int main(int argc, char *argv[]) {
	int n;
	scanf("%d\n",&n);
	int res = 0;
	for(int i=0;i<n;i++) scanf("%s\n",s[i]);
	
	for(int i=0;i<n;i++)
	for(int j=0;j<n;j++)
	if(i!=j&&strstr(s[i], s[j])){
		res++;
	}
	printf("%d",res);
}

Compilation message

lozinke.c:1:0: warning: ignoring #pragma Ofast  [-Wunknown-pragmas]
 #pragma Ofast
 
lozinke.c: In function 'main':
lozinke.c:7:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d\n",&n);
  ^~~~~~~~~~~~~~~~
lozinke.c:9:23: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  for(int i=0;i<n;i++) scanf("%s\n",s[i]);
                       ^~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 4 ms 256 KB Output is correct
5 Correct 14 ms 384 KB Output is correct
6 Correct 43 ms 256 KB Output is correct
7 Correct 37 ms 256 KB Output is correct
8 Correct 26 ms 384 KB Output is correct
9 Execution timed out 1081 ms 356 KB Time limit exceeded
10 Correct 661 ms 504 KB Output is correct
11 Execution timed out 1076 ms 512 KB Time limit exceeded
12 Execution timed out 1076 ms 512 KB Time limit exceeded
13 Execution timed out 1081 ms 512 KB Time limit exceeded
14 Execution timed out 1088 ms 512 KB Time limit exceeded
15 Execution timed out 1085 ms 500 KB Time limit exceeded
16 Execution timed out 1075 ms 512 KB Time limit exceeded
17 Execution timed out 1090 ms 512 KB Time limit exceeded
18 Execution timed out 1071 ms 512 KB Time limit exceeded
19 Execution timed out 1076 ms 512 KB Time limit exceeded
20 Execution timed out 1081 ms 512 KB Time limit exceeded