Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Default_Template
#include <bits/stdc++.h> #define ll long long int #define ull unsigned long long int #define ld long double #define pb push_back #define eb emplace_back #define mp make_pair #define mt make_tuple #define itf it->first #define its it->second #define MOD 1000000007 #define fo(i,a,b) for(i=a;i<b;i++) #define foe(i,a,b) for(i=a;i<=b;i++) #define rfo(i,a,b) for(i=a;i>b;i--) #define rfoe(i,a,b) for(i=a;i>=b;i--) #define all(x) x.begin(), x.end() #define vi vector<int> #define vll vector <long long int> #define pi pair <int,int> #define pll pair <long long int, long long int> #define pqi priority_queue<int> #define pqll priority_queue<long long int> #define vpi vector< pair<int,int> > #define vpll vector <pair<long long int, long long int>> #define boost ios::sync_with_stdio(false); cin.tie(0);cout.tie(0) #define endl "\n" using namespace std; ll add(ll x, ll y) {ll res=x+y; return(res>=MOD?res-MOD:res);} ll sub(ll x, ll y) {ll res=x-y; return(res<0?res+MOD:res);} ll mul(ll x, ll y) {ll res=0;x%=MOD; while(y){ if(y&1)res=(res+x)%MOD; x=(2*x)%MOD;y>>=1;}return res;} ll lcm(ll x, ll y) {ll res=(x*y)/__gcd(x,y); return res;} ll power(ll x, ll y) {ll res=1; x%=MOD; while(y){if(y&1)res=mul(res,x); y>>=1; x=mul(x,x);} return res;} void print(vll u){ ll j;cout<<endl; fo(j,0,u.size())cout<<u[j]<<" ";} void print(vector<vll> u){ll i,j; fo(i,0,u.size()){cout<<endl; fo(j,0,u[i].size()) cout<<u[i][j]<<" ";}} void solve(void); int main() { boost; ll t=1; cin>>t; while (t--) { solve(); cout<<"\n"; } return 0; } void solve() { ll n,m,k,a,b,i,j,s=0; cin>>n; vll v(n); fo(j,0,n)cin>>v[j]; sort(all(v)); cout<<s; }
run
|
edit
|
history
|
help
0
half diamond or pyramid
СПКИ АП КЭП 3
Barnicle
Nadpisanie metod
Triplet sum in array
2015(M2)Simulare
MINVEST
Microsoft - MaxEmployeeAttendence (R repititions - 1st step towards DP.)
Policy based smart pointer
sample