# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15536 | gs14004 | 흑백 이미지 찾기 (kriii3_G) | C++14 | 0 ms | 1296 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
typedef pair<int,int> pi;
int a[105][105], b[105][105];
int n, m, r, c;
bool ccw(pi a, pi b, pi c){
int dx1 = b.first - a.first;
int dy1 = b.second- a.second;
int dx2 = c.first - a.first;
int dy2 = c.second - a.second;
return 1ll * dx1 * dy2 != 1ll * dy1 * dx2;
}
vector<pi> v;
bool compare(int x, int y){
v.clear();
for(int i=1; i<=r; i++){
for(int j=1; j<=c; j++){
v.push_back(pi(a[x+i-1][y+j-1], b[i][j]));
}
}
for(int i=0; i<(int)v.size() - 2; i++){
if(ccw(v[i],v[i+1],v[i+2]) == 0){
continue;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |