Submission #710192

#TimeUsernameProblemLanguageResultExecution timeMemory
710192nicky4321Art Collections (BOI22_art)C++17
5 / 100
47 ms208 KiB
#include <bits/stdc++.h> #include "art.h" #define ll long long #define ld long double #define F first #define S second #define PB push_back #define MP make_pair #define pii pair<int, int> #define pll pair<ll, ll> #define pdd pair<double, double> #define ALL(x) x.begin(), x.end() #define vi vector<int> #define vl vector<ll> #define SZ(x) (int)x.size() #define CASE int t;cin>>t;for(int ca=1;ca<=t;ca++) #define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); using namespace std; const int MAX = 1 << 20, MOD = 1e9 + 7; void solve(int N){ int n = N; int lt = 0; vi v; for(int i = 1;i <= n;i++){ v.PB(i); } do{ int tmp = publish(v); if(!tmp){ answer(v); return; } lt = tmp; }while(next_permutation(ALL(v))); } // int main(){ // IOS // // CASE // int n; // cin >> n; // solve(n); // return 0; // }

Compilation message (stderr)

art.cpp: In function 'void solve(int)':
art.cpp:23:9: warning: variable 'lt' set but not used [-Wunused-but-set-variable]
   23 |     int lt = 0;
      |         ^~
interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   36 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...