diff --git a/Codes/474B Worms/474B.cpp b/Codes/474B Worms/474B.cpp new file mode 100644 index 0000000..0621a50 --- /dev/null +++ b/Codes/474B Worms/474B.cpp @@ -0,0 +1,88 @@ +#include +using namespace std; + +// Short forms +#define int long long +#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(unordered_set v) {cerr<<"[ "; for(T i : v) {_print(i); cerr<<" ";} cerr<<"]";} +template void _print(map v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";} +template void _print(multimap v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";} +template void _print(unordered_map v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void solve() +{ + int n,last=1; + cin>>n; + vector>v; + for(int i=1; i<=n; ++i) + { + int m; + cin>>m; + for(int j=0; j>q; + while(q--) + { + int x; + cin>>x; + cout<> TC; + while (TC--) solve(); +} \ No newline at end of file diff --git a/Readme.md b/Readme.md index 0b57273..1419bc9 100644 --- a/Readme.md +++ b/Readme.md @@ -2,7 +2,7 @@ This repository contains my solutions of Codeforces problems. They are in C++ language. -#### If this repository helped you out, please consider giving it a :star:. +#### If this repository helped you out, please consider giving it a :star:
@@ -62,7 +62,8 @@ This repository contains my solutions of Codeforces problems. They are in C++ la | 421A | Pasha and Hamsters | [Question](https://codeforces.com/problemset/problem/421/A) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/421A%20Pasha%20and%20Hamsters) | 456B | Fedya and Maths | [Question](https://codeforces.com/problemset/problem/456/B) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/456B%20Fedya%20and%20Maths) | 460 | Plural Form of Nouns | [Question](https://codeforces.com/problemsets/acmsguru/problem/99999/460) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/460%20Plural%20Form%20of%20Nouns) -| 486A | Calculating Function | [Question](https://codeforces.com/contest/486/problem/A) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/486A%20Calculating%20Function) +| 474B | Worms | [Question](https://codeforces.com/problemset/problem/474/B) | [Solution] +| 486A | Calculating Function | [Question](https://codeforces.com/problemset/problem/486/A) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/486A%20Calculating%20Function) | 492A | Vanya and Cubes | [Question](https://codeforces.com/problemset/problem/492/A) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/492A%20Vanya%20and%20Cubes) | 492B | Vanya and Lanterns | [Question](https://codeforces.com/problemset/problem/492/B) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/492A%20Vanya%20and%20Cubes) | 510A | Fox And Snake | [Question](https://codeforces.com/problemset/problem/510/A) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/510A%20Fox%20And%20Snake)