Submission #1073692

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10736922024-08-24 18:12:16Ausp3xPacking Biscuits (IOI20_biscuits)C++17
77 / 100
114 ms964 KiB
//
// author: Ausp3x
#pragma GCC optimize("O1, O2, O3, Ofast, unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include "biscuits.h"
using namespace std;
using namespace __gnu_pbds;
#define fi first
#define se second
#define pb push_back
// #define DEBUG
typedef long long lng;
typedef __int128 lli;
template<class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
int const INF32 = 0x3f3f3f3f;
lng const INF64 = 0x3f3f3f3f3f3f3f3f;
int x;
lng largest_p2(lng n) {
for (int i = 0ll; i < 61ll; i++) {
if((1ll << i) < n && n <= (1ll << (i + 1ll))) return i;
}
return 61ll;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

biscuits.cpp:4:55: warning: bad option '-f O2' to pragma 'optimize' [-Wpragmas]
    4 | #pragma GCC optimize("O1, O2, O3, Ofast, unroll-loops")
      |                                                       ^
biscuits.cpp:4:55: warning: bad option '-f O3' to pragma 'optimize' [-Wpragmas]
biscuits.cpp:4:55: warning: bad option '-f Ofast' to pragma 'optimize' [-Wpragmas]
biscuits.cpp:4:55: warning: bad option '-f unroll-loops' to pragma 'optimize' [-Wpragmas]
In file included from biscuits.cpp:7:
biscuits.h:3:64: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
    3 | long long count_tastiness(long long x, std::vector<long long> a);
      |                                                                ^
biscuits.h:3:64: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
biscuits.h:3:64: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
biscuits.h:3:64: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
biscuits.h:3:64: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
biscuits.h:3:64: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
biscuits.h:3:64: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
biscuits.h:3:64: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
biscuits.cpp:25:21: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
   25 | lng largest_p2(lng n) {
      |                     ^
biscuits.cpp:25:21: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
biscuits.cpp:25:21: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
biscuits.cpp:25:21: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
biscuits.cpp:35:13: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
   35 | lng dp(lng n) {
      |             ^
biscuits.cpp:35:13: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
biscuits.cpp:35:13: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
biscuits.cpp:35:13: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
biscuits.cpp:46:47: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
   46 | lng count_tastiness(lng given_x, vector<lng> A) {
      |                                               ^
biscuits.cpp:46:47: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
biscuits.cpp:46:47: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
biscuits.cpp:46:47: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
#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...