제출 #298767

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
2987672020-09-14 01:48:58Pro_ktmrMonochrome Points (JOI20_monochrome)C++14
35 / 100
2062 ms262540 KiB
#pragma GCC target ("avx2")
#pragma GCC optimize ("unroll-loops")
#pragma GCC optimize ("O3")
#include "bits/stdc++.h"
#include <unordered_set>
#include <unordered_map>
#include <random>
using namespace std;
typedef long long ll;
const ll MOD = 1'000'000'007LL; /*998'244'353LL;*/
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for(int (i)=0; (i)<(n); (i)++)
const int dx[4]={ 1,0,-1,0 };
const int dy[4]={ 0,1,0,-1 };
template<typename T>
struct TreapSet{
private:
struct Node{
T x; // value
int p; // priority
Node* par; // parent
Node* chi[2]; // children
int s; // size of subtree
T m; // minimum value of subtree
Node(T _x, std::mt19937& mt){
x = _x;
p = mt();
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

monochrome.cpp: In function 'void rotate(std::vector<std::pair<int, int> >&, int)':
monochrome.cpp:173:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  173 |     for(int i=idx; i<v.size(); i++) ret.pb(v[idx]);
      |                    ~^~~~~~~~~
monochrome.cpp:14:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   14 | #define rep(i, n) for(int (i)=0; (i)<(n); (i)++)
      |                           ^
monochrome.cpp:174:5: note: in expansion of macro 'rep'
  174 |     rep(i, idx) ret.pb(v[i]);
      |     ^~~
monochrome.cpp: In function 'll solve(int)':
monochrome.cpp:14:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   14 | #define rep(i, n) for(int (i)=0; (i)<(n); (i)++)
      |                           ^
monochrome.cpp:210:5: note: in expansion of macro 'rep'
  210 |     rep(j, N){
      |     ^~~
monochrome.cpp:14:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   14 | #define rep(i, n) for(int (i)=0; (i)<(n); (i)++)
      |                           ^
monochrome.cpp:220:5: note: in expansion of macro 'rep'
  220 |     rep(j, (int)v2.size()-1){
      |     ^~~
monochrome.cpp: In function 'int main()':
monochrome.cpp:14:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   14 | #define rep(i, n) for(int (i)=0; (i)<(n); (i)++)
      |                           ^
monochrome.cpp:240:5: note: in expansion of macro 'rep'
  240 |     rep(i, 2*N){
      |     ^~~
monochrome.cpp:238:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  238 |     scanf("%d", &N);
      |     ~~~~~^~~~~~~~~~
monochrome.cpp:239:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  239 |     scanf("%s", S);
      |     ~~~~~^~~~~~~~~
monochrome.cpp: In function 'll solve(int)':
monochrome.cpp:145:27: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
  145 |                 if(!seted || ret > u->chi[1]->m){
      |                    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
monochrome.cpp:135:11: note: 'ret' was declared here
  135 |         T ret;
      |           ^~~
monochrome.cpp:145:27: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
  145 |                 if(!seted || ret > u->chi[1]->m){
      |                    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
monochrome.cpp:135:11: note: 'ret' was declared here
  135 |         T ret;
      |           ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...