Submission #9568783
Source Code Expand
#include<bits/stdc++.h>
#define rep(a,b,c) for(int a=b;a<=c;a++)
#define per(a,b,c) for(int a=b;a>=c;a--)
#define pb push_back
#define mk make_pair
#define pii pair<int,int>
#define mem(a,b) memset(a,b,sizeof(a))
#define inf 0x3f3f3f3f
#define eps 1e-11
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
typedef double db;
const int mod = 1e9 + 7;
const int N = 5e5 + 5;
int n,m,k,s;
int a[N];
int main(){
scanf("%d%d%d",&n,&k,&s);
rep(i,1,k) a[i]=s;
rep(i,k+1,n){
if(s>5) a[i]=s-1;
else a[i]=s+1;
}
rep(i,1,n) printf("%d%c",a[i],i==n?'\n':' ');
return 0;
}
//
// _ooOoo_
// o8888888o
// 88" . "88
// (| -_- |)
// O\ = /O
// ____/`---'\____
// .' \| |// `.
// / \||| : |||// \
// / _||||| -:- |||||- \
// | | \ - /// | |
// | \_| ''\---/'' | |
// \ .-\__ `-` ___/-. /
// ___`. .' /--.--\ `. . __
// ."" '< `.___\_<|>_/___.' >'"".
// | | : `- \`.;`\ _ /`;.`/ - ` : | |
// \ \ `-. \_ __\ /__ _/ .-` / /
// ======`-.____`-.___\_____/___.-`____.-'======
// `=---='
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// 佛祖保佑 永无BUG
Submission Info
Submission Time
2020-01-18 21:25:22+0900
Task
C - Subarray Sum
User
hnust_TangYuefan
Language
C++14 (GCC 5.4.1)
Score
400
Code Size
1577 Byte
Status
AC
Exec Time
12 ms
Memory
1664 KiB
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:20:29: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&n,&k,&s);
^
Judge Result
Set Name
Sample
All
Score / Max Score
0 / 0
400 / 400
Status
Set Name
Test Cases
Sample
sample-01.txt, sample-02.txt
All
01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, sample-01.txt, sample-02.txt
Case Name
Status
Exec Time
Memory
01.txt
AC
5 ms
640 KiB
02.txt
AC
5 ms
640 KiB
03.txt
AC
11 ms
1664 KiB
04.txt
AC
11 ms
1664 KiB
05.txt
AC
11 ms
1664 KiB
06.txt
AC
12 ms
1664 KiB
07.txt
AC
12 ms
1664 KiB
08.txt
AC
10 ms
1024 KiB
09.txt
AC
10 ms
1152 KiB
10.txt
AC
10 ms
1024 KiB
11.txt
AC
10 ms
1024 KiB
12.txt
AC
11 ms
1152 KiB
13.txt
AC
10 ms
1152 KiB
14.txt
AC
10 ms
1280 KiB
15.txt
AC
10 ms
1280 KiB
16.txt
AC
12 ms
1664 KiB
17.txt
AC
4 ms
384 KiB
18.txt
AC
10 ms
768 KiB
19.txt
AC
1 ms
256 KiB
sample-01.txt
AC
1 ms
256 KiB
sample-02.txt
AC
1 ms
256 KiB