Submission #686432

# Submission time Handle Problem Language Result Execution time Memory
686432 2023-01-25T09:25:11 Z GudStonks Shymbulak (IZhO14_shymbulak) C++17
Compilation error
0 ms 0 KB
		if(i == 1)
			x = get(2, n);
		else if(i < n)
			x = combine(get(1, i - 1), get(i + 1, n));
		else
			x = get(1, n - 1);
		s.insert(x.ft);
		mp[x.ft] += x.sd;
	}
	auto it = s.end();it--;
	cout<<mp[*it];
}

int  main(){
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	int ttt = 1;
	//cin>>ttt;
	while(ttt--)fun();
}

Compilation message

shymbulak.cpp:1:3: error: expected unqualified-id before 'if'
    1 |   if(i == 1)
      |   ^~
shymbulak.cpp:3:3: error: expected unqualified-id before 'else'
    3 |   else if(i < n)
      |   ^~~~
shymbulak.cpp:5:3: error: expected unqualified-id before 'else'
    5 |   else
      |   ^~~~
shymbulak.cpp:7:3: error: 's' does not name a type
    7 |   s.insert(x.ft);
      |   ^
shymbulak.cpp:8:3: error: 'mp' does not name a type
    8 |   mp[x.ft] += x.sd;
      |   ^~
shymbulak.cpp:9:2: error: expected declaration before '}' token
    9 |  }
      |  ^
shymbulak.cpp:10:12: error: 's' was not declared in this scope
   10 |  auto it = s.end();it--;
      |            ^
shymbulak.cpp:10:20: error: 'it' does not name a type; did you mean 'int'?
   10 |  auto it = s.end();it--;
      |                    ^~
      |                    int
shymbulak.cpp:11:2: error: 'cout' does not name a type
   11 |  cout<<mp[*it];
      |  ^~~~
shymbulak.cpp:12:1: error: expected declaration before '}' token
   12 | }
      | ^
shymbulak.cpp: In function 'int main()':
shymbulak.cpp:15:2: error: 'ios' has not been declared
   15 |  ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
      |  ^~~
shymbulak.cpp:15:26: error: 'cin' was not declared in this scope
   15 |  ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
      |                          ^~~
shymbulak.cpp:15:37: error: 'cout' was not declared in this scope
   15 |  ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
      |                                     ^~~~
shymbulak.cpp:18:14: error: 'fun' was not declared in this scope
   18 |  while(ttt--)fun();
      |              ^~~