From 52536007b3c00887be9c83e56518c04f6f76974b Mon Sep 17 00:00:00 2001 From: ShazidMahsrafi Date: Mon, 11 Dec 2023 01:16:45 +0600 Subject: [PATCH] added 1719B --- 1719B Mathematical Circus/1719B.cpp | 89 +++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 1719B Mathematical Circus/1719B.cpp diff --git a/1719B Mathematical Circus/1719B.cpp b/1719B Mathematical Circus/1719B.cpp new file mode 100644 index 0000000..b6bfbde --- /dev/null +++ b/1719B Mathematical Circus/1719B.cpp @@ -0,0 +1,89 @@ +#include +using namespace std; + +// Short forms +#define ll long long +#define endl '\n' +#define ff first +#define ss second +#define pb push_back +#define all(x) x.begin(), x.end() +#define sz(x) (int)(x).size() + +// Outputs +#define yes cout<<"YES"< void _print(pair p); +template void _print(vector v);template void _print(set v); +template void _print(map v);template void _print(multiset v); +template void _print(pair p) {cerr << "{"; _print(p.first); cerr << ","; _print(p.second); cerr << "}";} +template void _print(vector v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";} +template void _print(set v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";} +template void _print(multiset v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";} +template void _print(map v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";} + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void solve() +{ + int n,k; + cin>>n>>k; + if(k%4==0) + no; + else if(k%4==2) + { + yes; + for(int i=1; i<=n; i+=2) + { + if((i+1)%4) + cout<> TC; + while (TC--) + solve(); +} \ No newline at end of file