-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathA_2023.cpp
50 lines (43 loc) · 2.18 KB
/
A_2023.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
~~~~~~~~~~~~{ after 1 Year of Pause, I am back : ) }~~~~~~~~~~
I will fall .... Yep free fall : ) .... I will go up again ! ...
Always proud of my efforts in past - 2nd Year(Start of cp) -- 3rd Year(till 1st sem)
Last 6 month of college ... want to look back and smile : ) , No Regret
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) begin(x) , end(x)
#define nl "\n"
// #include"/home/dk/debugging.h"
void solve(int& __case__)
{
int n ; cin >> n ;
int k ; cin >> k ;
vector<int> b(n) ;
int res = 1;
for(auto &x : b ) cin >> x , res *= x ;
if((2023 % res) == 0 ) {
cout << "YES" << nl ;
cout << 2023 / res << " " ;
k-- ; while(k--) cout << 1 << " " ;
cout << nl ;
} else {
cout << "NO" ;
cout << nl ;
}
}
signed main()
{ ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
int testCases = 1 , case_ = 1;
cin >> testCases; for (int case_ = 1; case_ <= testCases; case_++)
solve(case_);
}
/*
██████╗ ██╗██████╗ █████╗ ███╗ ██╗██╗ ██╗ █████╗ ██████╗
██╔══██╗██║██╔══██╗██╔══██╗████╗ ██║██║ ██╔╝██╔══██╗██╔══██╗
██║ ██║██║██████╔╝███████║██╔██╗ ██║█████╔╝ ███████║██████╔╝
██║ ██║██║██╔═══╝ ██╔══██║██║╚██╗██║██╔═██╗ ██╔══██║██╔══██╗
██████╔╝██║██║ ██║ ██║██║ ╚████║██║ ██╗██║ ██║██║ ██║
╚═════╝ ╚═╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
*/