Submission #1328027

#TimeUsernameProblemLanguageResultExecution timeMemory
1328027simplemind_31A Light Inconvenience (CEOI23_light)C++20
Compilation error
0 ms0 KiB
#include "light.h"
#include <bits/stdc++.h>
using namespace std;
typedef ll ll;
ll con;
bool xd;
vector<ll> nada;
void prepare(){
	con=1;
}
pair<ll,vector<ll>> join(ll p){
	if(xd){
		return make_pair(0ll,nada);
	}
	con+=p;
	vector<ll> res={con};
	return make_pair(1ll,res);
}
pair<ll,vector<ll>> leave(ll p){
	xd=true;
	return make_pair(0,nada);
}

Compilation message (stderr)

light.cpp:4:9: error: 'll' does not name a type
    4 | typedef ll ll;
      |         ^~
light.cpp:5:1: error: 'll' does not name a type
    5 | ll con;
      | ^~
light.cpp:7:8: error: 'll' was not declared in this scope
    7 | vector<ll> nada;
      |        ^~
light.cpp:7:10: error: template argument 1 is invalid
    7 | vector<ll> nada;
      |          ^
light.cpp:7:10: error: template argument 2 is invalid
light.cpp: In function 'void prepare()':
light.cpp:9:9: error: 'con' was not declared in this scope; did you mean 'cos'?
    9 |         con=1;
      |         ^~~
      |         cos
light.cpp: At global scope:
light.cpp:11:6: error: 'll' was not declared in this scope
   11 | pair<ll,vector<ll>> join(ll p){
      |      ^~
light.cpp:11:16: error: 'll' was not declared in this scope
   11 | pair<ll,vector<ll>> join(ll p){
      |                ^~
light.cpp:11:16: error: template argument 1 is invalid
light.cpp:11:16: error: template argument 2 is invalid
light.cpp:11:18: error: template argument 1 is invalid
   11 | pair<ll,vector<ll>> join(ll p){
      |                  ^~
light.cpp:11:18: error: template argument 2 is invalid
light.cpp:11:26: error: 'int join' redeclared as different kind of entity
   11 | pair<ll,vector<ll>> join(ll p){
      |                          ^~
In file included from light.cpp:1:
light.h:5:46: note: previous declaration 'std::pair<long long int, std::vector<long long int> > join(long long int)'
    5 | std::pair<long long, std::vector<long long>> join(long long);
      |                                              ^~~~
light.cpp:11:26: error: 'll' was not declared in this scope
   11 | pair<ll,vector<ll>> join(ll p){
      |                          ^~
light.cpp:19:6: error: 'll' was not declared in this scope
   19 | pair<ll,vector<ll>> leave(ll p){
      |      ^~
light.cpp:19:16: error: 'll' was not declared in this scope
   19 | pair<ll,vector<ll>> leave(ll p){
      |                ^~
light.cpp:19:16: error: template argument 1 is invalid
light.cpp:19:16: error: template argument 2 is invalid
light.cpp:19:18: error: template argument 1 is invalid
   19 | pair<ll,vector<ll>> leave(ll p){
      |                  ^~
light.cpp:19:18: error: template argument 2 is invalid
light.cpp:19:27: error: 'int leave' redeclared as different kind of entity
   19 | pair<ll,vector<ll>> leave(ll p){
      |                           ^~
light.h:6:46: note: previous declaration 'std::pair<long long int, std::vector<long long int> > leave(long long int)'
    6 | std::pair<long long, std::vector<long long>> leave(long long);
      |                                              ^~~~~
light.cpp:19:27: error: 'll' was not declared in this scope
   19 | pair<ll,vector<ll>> leave(ll p){
      |                           ^~