Submission #116807

# Submission time Handle Problem Language Result Execution time Memory
116807 2019-06-14T01:22:22 Z ntrung03 Lozinke (COCI17_lozinke) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;
string s[20002];
int main(int argc, char *argv[]) {
	ios_base::sync_with_stdio(false)
	int n;
	cin>>n;
	int res = 0;
	for(int i=0;i<n;i++) cin>>s[i];
	for(int i=0;i<n;i++)
	for(int j=0;j<n;j++)
	if(i!=j&&s[i].find(s[j])!=string::npos){
		res++;
	}
	cout<<res<<endl;
}

Compilation message

lozinke.cpp: In function 'int main(int, char**)':
lozinke.cpp:7:2: error: expected ';' before 'int'
  int n;
  ^~~
lozinke.cpp:8:7: error: 'n' was not declared in this scope
  cin>>n;
       ^