| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 267194 | taulant | Count Squares (CEOI19_countsquares) | C++17 | 2356 ms | 211384 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define int long long
int32_t main(){
int h, v; cin >> h >> v;
map<int, int> m1, m2;
vector<int> v1(h), v2(v);
for(int& i:v1) cin >> i;
for(int& i:v2) cin >> i;
for(int i=0; i<h; ++i){
for(int j=i+1; j<h; ++j) ++m1[v1[j]-v1[i]];
}
for(int i=0; i<v; ++i){
for(int j=i+1; j<v; ++j) ++m2[v2[j]-v2[i]];
}
int ans = 0;
for(auto i:m1) ans += i.second * m2[i.first];
cout << ans << endl;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
