Submission #1798570
Source Code Expand
#include <cstdio> int n; int a[101]; int main(){ scanf("%d", &n); for(int i=0; i<n; ++i) scanf("%d", &a[i]); int s = 1; for(int i=0; i<n; ++i) s *= 3; int t = 1; for(int i=0; i<n; ++i) t *= 2 - a[i] % 2; // printf("%d %d\n", s, t); printf("%d\n", s - t); }
Submission Info
Submission Time | |
---|---|
Task | B - Similar Arrays |
User | Power730 |
Language | C++14 (GCC 5.4.1) |
Score | 200 |
Code Size | 279 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:7:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ^ ./Main.cpp:8:43: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] for(int i=0; i<n; ++i) scanf("%d", &a[i]); ^
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask0_3.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask0_3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 1 ms | 128 KB |
02.txt | AC | 1 ms | 128 KB |
03.txt | AC | 1 ms | 128 KB |
04.txt | AC | 1 ms | 128 KB |
05.txt | AC | 1 ms | 128 KB |
06.txt | AC | 1 ms | 128 KB |
07.txt | AC | 1 ms | 128 KB |
subtask0_0.txt | AC | 1 ms | 128 KB |
subtask0_1.txt | AC | 1 ms | 128 KB |
subtask0_2.txt | AC | 1 ms | 128 KB |
subtask0_3.txt | AC | 1 ms | 128 KB |