제출 #624839

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
6248392022-08-08 20:55:47QwertyPiSandcastle 2 (JOI22_ho_t5)C++14
71 / 100
4046 ms1048576 KiB
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("avx2")
using namespace std;
const int N = 15013;
const int SQ = 240;
int a[200013];
int b[200013];
bool f[200013];
int s[200013];
int h, w;
int id(int i, int j){
return i * (w + 1) + j;
}
int id2(int i, int j){
return j * (h + 1) + i;
}
struct Range{
short x1, x2, y1, y2; // 1D; [x1, x2] x [y1, y2]
};
vector<Range> vrs[SQ][SQ];
int qry(int x1, int x2, int y1, int y2){
return s[id(x2 + 1, y2 + 1)] + s[id(x1, y1)] - s[id(x2 + 1, y1)] - s[id(x1, y2 + 1)];
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

Main.cpp:4:28: warning: bad option '-favx2' to pragma 'optimize' [-Wpragmas]
    4 | #pragma GCC optimize("avx2")
      |                            ^
Main.cpp:14:20: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   14 | int id(int i, int j){
      |                    ^
Main.cpp:17:21: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   17 | int id2(int i, int j){
      |                     ^
Main.cpp:26:39: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   26 | int qry(int x1, int x2, int y1, int y2){
      |                                       ^
Main.cpp:33:18: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   33 |  void clear(int n){
      |                  ^
Main.cpp:40:48: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   40 |  void upd(int x1, int x2, int y1, int y2, int v){
      |                                                ^
Main.cpp:46:16: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   46 |  void run(int n){
      |                ^
Main.cpp:53:22: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   53 |  int qry(int x, int y){
      |                      ^
Main.cpp:58:31: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   58 | int g(vector<Range>& vr, int h){
      |                               ^
Main.cpp:73:14: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   73 | int32_t main(){
      |              ^
Main.cpp: In function 'int32_t main()':
Main.cpp:136:29: warning: narrowing conversion of 'y3' from 'int' to 'short int' [-Wnarrowing]
  136 |      vrs[x3][x4].push_back({y3, y1, y2, y4});
      |                             ^~
Main.cpp:136:33: warning: narrowing conversion of 'y1' from 'int' to 'short int' [-Wnarrowing]
  136 |      vrs[x3][x4].push_back({y3, y1, y2, y4});
      |                                 ^~
Main.cpp:136:37: warning: narrowing conversion of 'y2' from 'int' to 'short int' [-Wnarrowing]
  136 |      vrs[x3][x4].push_back({y3, y1, y2, y4});
      |                                     ^~
Main.cpp:136:41: warning: narrowing conversion of 'y4' from 'int' to 'short int' [-Wnarrowing]
  136 |      vrs[x3][x4].push_back({y3, y1, y2, y4});
      |                                         ^~
Main.cpp:163:29: warning: narrowing conversion of 'y3' from 'int' to 'short int' [-Wnarrowing]
  163 |      vrs[x3][x4].push_back({y3, y1, y2, y4});
      |                             ^~
Main.cpp:163:33: warning: narrowing conversion of 'y1' from 'int' to 'short int' [-Wnarrowing]
  163 |      vrs[x3][x4].push_back({y3, y1, y2, y4});
      |                                 ^~
Main.cpp:163:37: warning: narrowing conversion of 'y2' from 'int' to 'short int' [-Wnarrowing]
  163 |      vrs[x3][x4].push_back({y3, y1, y2, y4});
      |                                     ^~
Main.cpp:163:41: warning: narrowing conversion of 'y4' from 'int' to 'short int' [-Wnarrowing]
  163 |      vrs[x3][x4].push_back({y3, y1, y2, y4});
      |                                         ^~
#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...