Submission #19321239
Source Code Expand
#include <bits/stdc++.h>
#define rep(i, N) for(int i = 0; i < (int)N; i++)
#define CREP(i, l, r) for(int i = l; i <= r; i++)
using namespace std;
typedef long long ll;
typedef tuple<int,int,int> T;
typedef pair<int,int> P;
typedef vector<int> V;
typedef vector<int> Vll;
const int INF = 1000000000; //10^9, 2*INF
const ll LLINF = (1LL << 60); // > 10^18 ll 2*LLINF
int main() {
int n;
cin >> n;
V a(n), b(n);
rep(i, n) scanf("%d", &a[i]);
rep(i, n) scanf("%d", &b[i]);
ll ans = 0;
rep(i,n){
ans += a[i]*b[i];
}
if(ans == 0) puts("Yes");
else puts("No");
}
Submission Info
| Submission Time |
|
| Task |
B - Orthogonality |
| User |
samari06 |
| Language |
C++ (GCC 9.2.1) |
| Score |
200 |
| Code Size |
642 Byte |
| Status |
AC |
| Exec Time |
34 ms |
| Memory |
3996 KiB |
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:17:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
17 | rep(i, n) scanf("%d", &a[i]);
| ~~~~~^~~~~~~~~~~~~
./Main.cpp:18:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
18 | rep(i, n) scanf("%d", &b[i]);
| ~~~~~^~~~~~~~~~~~~
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 |
34 ms |
3968 KiB |
| extreme_01.txt |
AC |
30 ms |
3956 KiB |
| extreme_02.txt |
AC |
3 ms |
3476 KiB |
| handmade_00.txt |
AC |
2 ms |
3656 KiB |
| handmade_01.txt |
AC |
3 ms |
3532 KiB |
| handmade_02.txt |
AC |
2 ms |
3676 KiB |
| handmade_03.txt |
AC |
3 ms |
3660 KiB |
| handmade_04.txt |
AC |
3 ms |
3660 KiB |
| handmade_05.txt |
AC |
2 ms |
3480 KiB |
| random_00.txt |
AC |
29 ms |
3996 KiB |
| random_01.txt |
AC |
28 ms |
3984 KiB |
| random_02.txt |
AC |
5 ms |
3712 KiB |
| random_03.txt |
AC |
24 ms |
3892 KiB |
| random_04.txt |
AC |
6 ms |
3752 KiB |
| random_05.txt |
AC |
17 ms |
3716 KiB |
| sample_01.txt |
AC |
2 ms |
3652 KiB |
| sample_02.txt |
AC |
3 ms |
3620 KiB |
| sample_03.txt |
AC |
2 ms |
3476 KiB |