Submission #46070643
Source Code Expand
#include<bits/stdc++.h>
//#include<atcoder/all>
using namespace std;
//using namespace atcoder;
typedef long long ll;
#define rep(i,n) for(ll i=0;i<n;++i)
#define rrep(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,s,e) for(ll i=s;i<=e;++i)
#define FFOR(i,s,e) for(ll i=s;i>=e;--i)
#define yesno(flg) if(flg){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define ALL(a) (a).begin(),(a).end()
#define mp make_pair
#define pb push_back
#define vl vector<ll>
#define vs vector<string>
#define so(a) sort(a.begin(),a.end())
#define fi first
#define se second
#define print(a) cout<<a<<endl
#define ssize(a) (ll)(a.size())
#define MAX_N 1002
#define i197 1000000007
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const ll INF=1000000000000000001;
struct edge
{
int to, cost;
};
struct pos{
// 1 変数を入れる;
ll t;
ll x,y;
set<ll> st;
};
int dx[4] = { 1, 0, -1, 0};
int dy[4] = { 0, 1, 0, -1};
int dd[5] = { 0, 1, 0, -1, 0};
typedef pair<ll, ll> P2;
typedef pair<pair<ll,ll>,ll> P3;
typedef pair<string,ll> Ps;
typedef pair<pair<ll,ll>,pair<ll,ll> > P4;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
ll n,m;
cin>>n>>m;
vl a(m);
rep(i,m)cin>>a[i];
ll i2=0;
FOR(i,1,n){
if(a[i2]<i)i2++;
print(a[i2]-i);
}
return 0;
}
Submission Info
| Submission Time |
|
| Task |
C - Festival |
| User |
akarinkof |
| Language |
C++ 20 (gcc 12.2) |
| Score |
250 |
| Code Size |
1471 Byte |
| Status |
AC |
| Exec Time |
187 ms |
| Memory |
4624 KiB |
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
250 / 250 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
example_00.txt, example_01.txt |
| All |
example_00.txt, example_01.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt |
| Case Name |
Status |
Exec Time |
Memory |
| example_00.txt |
AC |
1 ms |
3492 KiB |
| example_01.txt |
AC |
1 ms |
3500 KiB |
| test_00.txt |
AC |
102 ms |
3364 KiB |
| test_01.txt |
AC |
127 ms |
3612 KiB |
| test_02.txt |
AC |
19 ms |
3520 KiB |
| test_03.txt |
AC |
20 ms |
3476 KiB |
| test_04.txt |
AC |
139 ms |
3920 KiB |
| test_05.txt |
AC |
14 ms |
3612 KiB |
| test_06.txt |
AC |
44 ms |
3484 KiB |
| test_07.txt |
AC |
51 ms |
3556 KiB |
| test_08.txt |
AC |
139 ms |
3532 KiB |
| test_09.txt |
AC |
150 ms |
3556 KiB |
| test_10.txt |
AC |
185 ms |
4092 KiB |
| test_11.txt |
AC |
185 ms |
4096 KiB |
| test_12.txt |
AC |
184 ms |
4096 KiB |
| test_13.txt |
AC |
186 ms |
3972 KiB |
| test_14.txt |
AC |
181 ms |
3568 KiB |
| test_15.txt |
AC |
187 ms |
4348 KiB |
| test_16.txt |
AC |
183 ms |
3640 KiB |
| test_17.txt |
AC |
181 ms |
3588 KiB |
| test_18.txt |
AC |
183 ms |
3812 KiB |
| test_19.txt |
AC |
183 ms |
3708 KiB |
| test_20.txt |
AC |
183 ms |
3500 KiB |
| test_21.txt |
AC |
180 ms |
3624 KiB |
| test_22.txt |
AC |
183 ms |
3560 KiB |
| test_23.txt |
AC |
181 ms |
3556 KiB |
| test_24.txt |
AC |
181 ms |
3556 KiB |
| test_25.txt |
AC |
1 ms |
3496 KiB |
| test_26.txt |
AC |
186 ms |
4624 KiB |