Submission #1459601
Source Code Expand
#include<iostream>
#include<vector>
using namespace std;
int main() {
int a = 0;
int b = 0;
vector<int> vec;
cin >> a;
for (int i = 0; i < a; ++i) {
cin >> b;
vec.push_back(b);
}
for (int i = 0; i < a; ++i) {
if (vec[i] == 1) {
cout << i + 1 << endl;
break;
}
}
system("pause");
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | E - 1は何番目? |
| User | Korinyukkuri |
| Language | C++14 (GCC 5.4.1) |
| Score | 200 |
| Code Size | 334 Byte |
| Status | AC |
| Exec Time | 2 ms |
| Memory | 504 KiB |
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:19:17: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system("pause");
^
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, sample_04.txt |
| All | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01-01.txt | AC | 2 ms | 504 KiB |
| 01-02.txt | AC | 2 ms | 504 KiB |
| 01-03.txt | AC | 2 ms | 504 KiB |
| 01-04.txt | AC | 2 ms | 504 KiB |
| 01-05.txt | AC | 2 ms | 500 KiB |
| 01-06.txt | AC | 2 ms | 504 KiB |
| 01-07.txt | AC | 2 ms | 504 KiB |
| 01-08.txt | AC | 2 ms | 500 KiB |
| 01-09.txt | AC | 2 ms | 504 KiB |
| 01-10.txt | AC | 2 ms | 504 KiB |
| 01-11.txt | AC | 2 ms | 504 KiB |
| 01-12.txt | AC | 2 ms | 504 KiB |
| 01-13.txt | AC | 2 ms | 504 KiB |
| 01-14.txt | AC | 2 ms | 504 KiB |
| 01-15.txt | AC | 2 ms | 504 KiB |
| sample_01.txt | AC | 2 ms | 504 KiB |
| sample_02.txt | AC | 2 ms | 504 KiB |
| sample_03.txt | AC | 2 ms | 500 KiB |
| sample_04.txt | AC | 2 ms | 504 KiB |