Submission #1500142
Source Code Expand
#include <bits/stdc++.h>
using namespace std ;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) begin(r),end(r)
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)
#define vvl(v,w,h,init) vector<vector<ll>> v(w,vector<ll>(h,init))
#define mp(a,b) make_pair(a,b)
#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))
using ll = long long;
using pii = pair<int,int> ;
using pll = pair<ll,ll> ;
const ll mod = 1e9+7;
constexpr ll inf = ((1<<30)-1)*2+1 ;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0,1,-1,1,-1};
const int dx[] = {0,-1,0,1,1,-1,-1,1};
inline bool value(int x,int y,int w,int h){
return (x >= 0 && x < w && y >= 0 && y < h);
}
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
ll n;
cin >> n;
ll c = 1;
rep(i,n){
cin >> c;
if(c == 1){
std::cout << i + 1 << std::endl;
return 0;
}
}
return 0;
}
Submission Info
| Submission Time |
|
| Task |
E - 1は何番目? |
| User |
Halksel |
| Language |
C++14 (GCC 5.4.1) |
| Score |
200 |
| Code Size |
1366 Byte |
| Status |
AC |
| Exec Time |
1 ms |
| Memory |
256 KiB |
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 |
1 ms |
256 KiB |
| 01-02.txt |
AC |
1 ms |
256 KiB |
| 01-03.txt |
AC |
1 ms |
256 KiB |
| 01-04.txt |
AC |
1 ms |
256 KiB |
| 01-05.txt |
AC |
1 ms |
256 KiB |
| 01-06.txt |
AC |
1 ms |
256 KiB |
| 01-07.txt |
AC |
1 ms |
256 KiB |
| 01-08.txt |
AC |
1 ms |
256 KiB |
| 01-09.txt |
AC |
1 ms |
256 KiB |
| 01-10.txt |
AC |
1 ms |
256 KiB |
| 01-11.txt |
AC |
1 ms |
256 KiB |
| 01-12.txt |
AC |
1 ms |
256 KiB |
| 01-13.txt |
AC |
1 ms |
256 KiB |
| 01-14.txt |
AC |
1 ms |
256 KiB |
| 01-15.txt |
AC |
1 ms |
256 KiB |
| sample_01.txt |
AC |
1 ms |
256 KiB |
| sample_02.txt |
AC |
1 ms |
256 KiB |
| sample_03.txt |
AC |
1 ms |
256 KiB |
| sample_04.txt |
AC |
1 ms |
256 KiB |