Submission #484956

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4849562021-11-05 20:16:56AmirElarbiCounting Mushrooms (IOI20_mushrooms)C++14
Compilation error
0 ms0 KiB
//#include "mushrooms.h"
#include <bits/stdc++.h>
#define vi vector<int>
#define ve vector
#define ll long long
#define vf vector<float>
#define vll vector<pair<ll,ll>>
#define ii pair<int,int>
#define vvi vector<vi>
#define vii vector<ii>
#define gii greater<ii>
#define pb push_back
#define fi first
#define se second
#define INF 1e7
#define eps 1e-18
#define eps1 1e-25
#define optimise ios_base::sync_with_stdio(false);cin.tie(NULL);
#define MAX_A 1e5+5
#define V 450
using namespace std;
const int MOD = 1e9+7;
const int nax = 2000005;
string s = "";
int use_machine(vector<int> a){
int cnt = 0;
for(int i = 0;i<((int)a.size())-1;i++){
if(s[a[i]] != s[a[i+1]])cnt++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:153:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  153 |         for(int j = i; j < i+typ[0].size() && j < n;j++){
      |                        ~~^~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccQeOWHX.o: in function `use_machine(std::vector<int, std::allocator<int> >)':
stub.cpp:(.text+0x210): multiple definition of `use_machine(std::vector<int, std::allocator<int> >)'; /tmp/ccz3W0k0.o:mushrooms.cpp:(.text+0x0): first defined here
/usr/bin/ld: /tmp/ccQeOWHX.o: in function `main':
stub.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccz3W0k0.o:mushrooms.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status