제출 #746884

#제출 시각아이디문제언어결과실행 시간메모리
746884anusha777A Difficult(y) Choice (BOI21_books)C++14
컴파일 에러
0 ms0 KiB
#include "books.h" #include <bits/stdc++.h> #define fast ios::sync_with_stdio(0); cin.tie(NULL);cout.tie(NULL) #define sz(x) (int)((x).size()) #define pb push_back #define vi vector<int> #define vb vector<bool> #define vvb vector<vb> #define pi pair<int,int> #define vpi vector<pi> #define vvi vector<vi> #define vc vector<char> #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define pbb() pop_back() #define f first //#define s second #define ll long long //#define int long long #define ull unsigned long long #define forr(i, a, b) for(int i=a; i<b; i++) const int N=120000+1, mod=1e9 + 9, inf=1e27+1; using namespace std; //vi dx= { 0, 1, 0 , -1} , dy= {-1,0, 1, 0}; void solve2(int n, int k, ll a , int s) { vector<ll> p(n+1); forr(i, 1, n+1) p[i]= p[i-1] + skim(i); forr(i, k, n+1) if(p[i]-p[k]>=a and p[i]-p[k]<=2*a) { vi v; forr(j, i-k, i+1) a.pb(j); answer(v); } imposssible(); } void solve(int n, int k, ll a , int s) { if(n==s) solve2(n, k,a ,s) } //signed main() //{ // fast; // int t; // t=1; // //cin>>t; // while(t--) task(); //}

컴파일 시 표준 에러 (stderr) 메시지

books.cpp:22:44: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+27' to '2147483647' [-Woverflow]
   22 | const int N=120000+1, mod=1e9 + 9, inf=1e27+1;
      |                                        ~~~~^~
books.cpp: In function 'void solve2(int, int, long long int, int)':
books.cpp:5:15: error: request for member 'push_back' in 'a', which is of non-class type 'long long int'
    5 | #define pb    push_back
      |               ^~~~~~~~~
books.cpp:32:33: note: in expansion of macro 'pb'
   32 |             forr(j, i-k, i+1) a.pb(j);
      |                                 ^~
books.cpp:35:5: error: 'imposssible' was not declared in this scope; did you mean 'impossible'?
   35 |     imposssible();
      |     ^~~~~~~~~~~
      |     impossible
books.cpp: In function 'void solve(int, int, long long int, int)':
books.cpp:39:31: error: expected ';' before '}' token
   39 |     if(n==s) solve2(n, k,a ,s)
      |                               ^
      |                               ;
   40 | }
      | ~