Submission #1037161

#TimeUsernameProblemLanguageResultExecution timeMemory
1037161hotboy2703Navigation 2 (JOI21_navigation2)C++17
Compilation error
0 ms0 KiB
#include "Bruno.h" #include<bits/stdc++.h> using ll = long long; using namespace std; #define pll pair <ll,ll> #define fi first #define se second #define sz(a) (ll((a).size())) #define BIT(mask,i) (((mask) >> (i))&1) #define MASK(i) (1LL << (i)) #define MP make_pair std::vector<int> Bruno(int K, std::vector<int> value) { vector <vector <ll > > val(3,vector <ll> (3)); for (ll i = 0;i < 9;i ++)val[i/3][i%3] = value[i]; vector <vector <ll> > type(3,vector<ll> (3)); for (ll i = 0;i < 3;i ++){ for (ll j = 0;j < 3;j ++){ if (val[i][j] == 14 && val[i][(j+1)%3] == 14){ for (ll i1 = 0;i1 < 3;i1 ++){ for (ll j1 = 0;j1 < 3;j1 ++){ ll x = (2 + (i1 - i) + 3)%3; ll y = (1 + (j1 - j) + 3)%3; type[i1][j1] = x * 3 + y; } } } } } // for (ll i = 0;i < 3;i ++){ // for (ll j = 0;j < 3;j ++)cout<<val[i][j]<<' '; // cout<<'\n'; // } vector <int> res(K); for (ll i = 0;i < 3;i ++){ for (ll j = 0;j < 3;j ++){ if (type[i][j] < K){ ll ni,nj; auto &ans = res[type[i][j]]; if (val[i][j] <= 9){ ni = i+(val[i][j]-1)/3-1; nj = j+(val[i][j]-1)%3-1; if (nj > 1)ans = 0; else if (nj < 1)ans = 1; else if (ni > 1)ans = 2; else if (ni < 1)ans = 3; else ans = 4; // cout<<"SUS "<<ni<<' '<<nj<<' '<<ans<<endl; } else{ ans = val[i][j] - 10; } // cout<<i<<' '<<j<<' '<<type[i][j]<<' '<<ans<<endl; } } } return res; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccU9f2yg.o: in function `main':
grader_anna.cpp:(.text.startup+0x345): undefined reference to `Anna(int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status

/usr/bin/ld: /tmp/ccrNhmZ1.o: in function `main':
grader_bruno.cpp:(.text.startup+0x1d3): undefined reference to `Bruno(int, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status