Submission #970692

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9706922024-04-27 05:16:56vjudge1New Home (APIO18_new_home)C++17
0 / 100
142 ms45244 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define pii pair<int,int>
#define ss second
#define ff first
signed main()
{
//cout<<"hgahwg";
int t1,t2,t3,t4;
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
/*
initial set:
-> at least on eo feach type
int currant -> where youre at now (vector)
bitset of taken; take till typestaken=types; push into vector of vectors
each new one taken:check if currtaken for that one is whats at the bottom
boittom:check bottom for tha tione where ur at now for each ttype
-> replace else no
-> at each stage after all maximums ->take currmxa - currmin
*/
int n,k,q;
cin>>n>>k>>q;
//scout<<"banana";
queue<pii>nottake; //location, type
queue<pii>taken;
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

new_home.cpp: In function 'int main()':
new_home.cpp:53:29: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   53 |         if(currnum & (1<<a) == 0)
      |                      ~~~~~~~^~~~
new_home.cpp:126:33: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  126 |         while((currat[currtype] < bytypes[currtype].size()) && (abs(currque-bytypes[currtype][currat[currtype]]) < abs(currque-bytypes[currtype][currat[currtype]-1])))
new_home.cpp:48:9: warning: unused variable 'constk' [-Wunused-variable]
   48 |     int constk = k;
      |         ^~~~~~
#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...