diff --git a/1843A Sasha and Array Coloring/1843A.cpp b/1843A Sasha and Array Coloring/1843A.cpp new file mode 100644 index 0000000..a1a2156 --- /dev/null +++ b/1843A Sasha and Array Coloring/1843A.cpp @@ -0,0 +1,34 @@ +#include +using namespace std; +using ll = long long; + +void solve() +{ + int n; + cin>>n; + vector v; + for(int i=0; i>x; + v.push_back(x); + } + sort(v.begin(),v.end()); + int cost=0; + for(int i=0, j=n-1; i> TC; + cin.ignore(); + while (TC--) solve(); +} \ No newline at end of file