Submission #19316102
Source Code Expand
Copy
#include <bits/stdc++.h>#define debug_input freopen("stdin.in", "r", stdin)#define debug_output freopen("stdout.out", "w", stdout)#define FOR(i, a, b) for(int i = a; i <= b; i++)#define FORALL(i, n) for(int i = 0; i < n; i++)#define FORD(i, a, b) for(int i = a; i >= b; i--)#define SORT(a) sort(a.begin(), a.end())#define REV(a) reverse(a.begin(), a.end())#define NP(a) next_permutation(a.begin(), a.end())#define ALL(a) a.begin, a.end()#define mp make_pair#define pb push_back#define endl '\n'using namespace std;typedef long long ll;typedef unsigned long long ull;const int N = 1e5 + 5;const int mod = 1e9 + 7;
#include <bits/stdc++.h> #define debug_input freopen("stdin.in", "r", stdin) #define debug_output freopen("stdout.out", "w", stdout) #define FOR(i, a, b) for(int i = a; i <= b; i++) #define FORALL(i, n) for(int i = 0; i < n; i++) #define FORD(i, a, b) for(int i = a; i >= b; i--) #define SORT(a) sort(a.begin(), a.end()) #define REV(a) reverse(a.begin(), a.end()) #define NP(a) next_permutation(a.begin(), a.end()) #define ALL(a) a.begin, a.end() #define mp make_pair #define pb push_back #define endl '\n' using namespace std; typedef long long ll; typedef unsigned long long ull; const int N = 1e5 + 5; const int mod = 1e9 + 7; const ll inf = 1e18; const double pi = 3.141592653589793; const int dr[4] = {-1,0,1,0}, dc[4] = {0,1,0,-1}; void solve() { int n; cin >> n; vector<ll> a(n), b(n); FORALL(i, n) { cin >> a[i]; } FORALL(i, n) { cin >> b[i]; } ll tot = 0; FORALL(i, n) { tot += (ll) a[i] * b[i]; } cout << (tot == 0 ? "Yes" : "No") << endl; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); int t = 1; //cin >> t; while(t--) { solve(); } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Orthogonality |
User | JFCJAYA |
Language | C++ (GCC 9.2.1) |
Score | 200 |
Code Size | 1151 Byte |
Status | AC |
Exec Time | 24 ms |
Memory | 4728 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | extreme_00.txt, extreme_01.txt, extreme_02.txt, handmade_00.txt, handmade_01.txt, handmade_02.txt, handmade_03.txt, handmade_04.txt, handmade_05.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, sample_01.txt, sample_02.txt, sample_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
extreme_00.txt | AC | 23 ms | 4632 KB |
extreme_01.txt | AC | 22 ms | 4692 KB |
extreme_02.txt | AC | 2 ms | 3612 KB |
handmade_00.txt | AC | 2 ms | 3504 KB |
handmade_01.txt | AC | 2 ms | 3548 KB |
handmade_02.txt | AC | 3 ms | 3616 KB |
handmade_03.txt | AC | 2 ms | 3644 KB |
handmade_04.txt | AC | 2 ms | 3580 KB |
handmade_05.txt | AC | 3 ms | 3508 KB |
random_00.txt | AC | 24 ms | 4728 KB |
random_01.txt | AC | 21 ms | 4712 KB |
random_02.txt | AC | 4 ms | 3568 KB |
random_03.txt | AC | 18 ms | 4488 KB |
random_04.txt | AC | 5 ms | 3736 KB |
random_05.txt | AC | 15 ms | 4256 KB |
sample_01.txt | AC | 2 ms | 3612 KB |
sample_02.txt | AC | 2 ms | 3652 KB |
sample_03.txt | AC | 2 ms | 3552 KB |