Submission #1308997

#TimeUsernameProblemLanguageResultExecution timeMemory
1308997sweetwibu2k8Ancient Machine (JOI21_ancient_machine)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "Anna.h" using namespace std; #define endl "\n" #define fi first #define se second #define pb push_back #define p_q priority_queue #define bit(n, i) (((n)>>(i))&1) #define all(x) x.begin(), x.end() typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,int> pli; typedef vector <vector <int> > vvi; const int M = 1e6 + 6; const int mod = 1e9 + 7; const int inf = 1e9 + 7; void maximize (int &a, int b) { if (a < b) a = b; } void minimize (int &a, int b) { if (a > b) a = b; } void add (int &a, int b) { a += b; if (a >= mod) a -= mod; } void del (int &a, int b) { a -= b; if (a < 0) a += mod; } // Anna void Anna (int N, vector <char> S) { bool flag = false; for (int i = 0; i < N; i ++) { if (S[i] == 'X' and !flag) { send (1); flag = true; } else if (S[i] == 'X' or S[i] == 'Y') send (0); else send (1); } }
#include <bits/stdc++.h> #include "Bruno.h" using namespace std; #define endl "\n" #define fi first #define se second #define pb push_back #define p_q priority_queue #define bit(n, i) (((n)>>(i))&1) #define all(x) x.begin(), x.end() typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,int> pli; typedef vector <vector <int> > vvi; const int M = 1e6 + 6; const int mod = 1e9 + 7; const int inf = 1e9 + 7; void maximize (int &a, int b) { if (a < b) a = b; } void minimize (int &a, int b) { if (a > b) a = b; } void add (int &a, int b) { a += b; if (a >= mod) a -= mod; } void del (int &a, int b) { a -= b; if (a < 0) a += mod; } // Bruno void Bruno (int N, int L, vector <int> A) { vector <int> st; reverse (all (A)); int cnt = 0; while (A.size() and A.back() == 0) { remove (cnt); cnt ++; A.pop_back (); } int firstX = cnt ++; A.pop_back (); while (A.size()) { if (A.back () == 1) { while (st.size()) { remove (st.back()); st.pop_back (); } remove (cnt); } else st.pb (cnt); cnt ++; } remove (firstX); }

Compilation message (stderr)

# 1번째 컴파일 단계

Anna.cpp: In function 'void Anna(int, std::vector<char>)':
Anna.cpp:36:25: error: 'send' was not declared in this scope; did you mean 'Send'?
   36 |                         send (1);
      |                         ^~~~
      |                         Send
Anna.cpp:39:54: error: 'send' was not declared in this scope; did you mean 'Send'?
   39 |                 else if (S[i] == 'X' or S[i] == 'Y') send (0);
      |                                                      ^~~~
      |                                                      Send
Anna.cpp:40:22: error: 'send' was not declared in this scope; did you mean 'Send'?
   40 |                 else send (1);
      |                      ^~~~
      |                      Send