제출 #422908

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4229082021-06-10 13:56:56Andyvanh1Count Squares (CEOI19_countsquares)C++14
100 / 100
1210 ms97728 KiB
#include <bits/stdc++.h>
using namespace std;
#define vt vector
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define rep(i,x) for(int (i) = 0; (i) < (x); (i)++ )
typedef long long ll;
typedef long double ld;
typedef vt<int> vi;
typedef pair<int,int> pii;
unordered_map<int,int> mp1;
unordered_map<int,int> mp2;
void solve(){
int n, m;
cin>>n>>m;
vi arr1(n);
vi arr2(m);
rep(i,n)cin>>arr1[i];
rep(i,m)cin>>arr2[i];
vt<int> vec;
for(int i = 0; i < n; i++){
for(int j = i+1; j < n; j++){
int x = arr1[j]-arr1[i];
if(mp1.find(x)==mp1.end()){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

countsquares.cpp: In function 'void solve()':
countsquares.cpp:8:26: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    8 | #define rep(i,x) for(int (i) = 0; (i) < (x); (i)++ )
      |                          ^
countsquares.cpp:24:5: note: in expansion of macro 'rep'
   24 |     rep(i,n)cin>>arr1[i];
      |     ^~~
countsquares.cpp:8:26: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    8 | #define rep(i,x) for(int (i) = 0; (i) < (x); (i)++ )
      |                          ^
countsquares.cpp:25:5: note: in expansion of macro 'rep'
   25 |     rep(i,m)cin>>arr2[i];
      |     ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...