uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
bb8be20d-1453-4f65-bdad-f761974d4c65
jianjiachenghub/CLanguageProgramming
算法分析/变位词.cpp
#include<iostream> #include<algorithm> #include<string.h> #include<stdio.h> using namespace std; int main() { int n; cin>>n; int arrf[n]={0}; int count=0; for(int i=0;i<n;i++) { char arr[100]; char arr2[100]; cin>>arr; cin>>arr2; sort(arr,arr+strlen(arr)); sort(arr2,arr2+strlen(arr2)); if(str...
ALGO
0.999971
3.595136
2153b2d7-dc9e-49bd-b0f6-2e314f7bccdb
daikidaiku/procon-archive
atcoder.jp/abc312/abc312_b/Main.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<(n); i++) #define rep2(i,x,n) for(int i=x; i<(n); i++) #define all(...) begin(__VA_ARGS__), end(__VA_ARGS__) #define rall(...) rbegin(__VA_ARGS__), rend(__VA_ARGS__) struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; const long l...
ALGO
0.999904
3.223226
d79d028b-48ac-47e5-8781-162c4abf0b9d
jedis/jediacademy
code/jpeg-6/jcsample.cpp
// leave this as first line for PCH reasons... // #include "../server/exe_headers.h" #define JPEG_INTERNALS #include "jinclude.h" #include "jpeglib.h" /* Pointer to routine to downsample a single component */ typedef JMETHOD(void, downsample1_ptr, (j_compress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY ...
TOOL
0.926989
5.178618
5953054e-0e1e-48df-b4bc-91d52ecf2647
Tearth/Proxima-b
Source/Heuristic.cpp
#include "Headers/Heuristic.h" Heuristic::Heuristic() { kingMaterialRate = 1000000; } Heuristic::~Heuristic() { } int Heuristic::GetBoardValue(Board board, HeuristicDiagnosticData &d) { int whiteMaterial = 0; int blackMaterial = 0; int whiteKingSecurity = 0; int blackKingSecurity = 0; int whiteKingPositionR...
ALGO
0.976348
3.97232
73029d84-b659-4052-bee0-0235abfc9009
JeffTimoman/binusOnlineJudge
LAB/CHALLENGE 02.09.22/breakingTheRecord.cpp
#include <stdio.h> int main(){ int n; scanf("%d", &n); long long int max, min; int counter_max = 0, counter_min = 0; for (int i = 0; i < n; i++){ long long int x; scanf("%lld", &x); if (i == 0){ max = x; min = x; } if (x > max){ ...
ALGO
0.999705
4.035812
3a869f4f-7855-4e88-a62b-ddd9ebd7822f
mjs513/Sainsmart_4WD_Obstacle_Avoid_TestBed
libraries/StandardCplusplus/char_traits.cpp
#define __UCLIBCXX_COMPILE_CHAR_TRAITS__ 1 #include <basic_definitions> #include <char_traits> namespace std{ _UCXXEXPORT const char_traits<char>::char_type* char_traits<char>::find(const char_type* s, int n, const char_type& a){ for(int i=0; i < n; i++){ if(eq(s[i], a)){ return (s+i); } } return 0; } _UC...
TOOL
0.901882
5.091949
50fa8e33-8a9b-448a-8e1a-94184ff21b17
hardik302001/leetcode
problems/find_in_mountain_array/solution.cpp
class Solution { public: int findInMountainArray(int target, MountainArray &mount) { int l = 0; int r = mount.length()-1; int peak; while (l<r){ int m = l + (r-l)/2; int midvalue = mount.get(m); if(midvalue > mount.get(m+1)){ if(mi...
ALGO
0.99999
5.996195
0678ab1e-69e3-4a56-9cf2-0d963a269ade
SmittyHalibut/HamClock
sphere.cpp
#include "HamClock.h" /* solve a spherical triangle: * A * / \ * / \ * c / \ b * / \ * / \ * B ____________ C * a * * given A, b, c find B and a in range -PI..B..PI and 0..a..PI, respectively.. * cap and Bp may be NULL if not i...
ALGO
0.999778
4.89885
e8150526-ca1a-4712-8dee-c7434bf04e0b
yuejiangw/leetcode-1
company/amazon/two_sum_bst.cpp
#include <algorithm> #include <iostream> #include <stack> #include <vector> using namespace std; struct Node { int data; Node *left, *right; Node(int d) : data(d) { } }; /*! \brief count * * count the total number of pairs of nodes added up to target * * \param root1 first bst * \para...
ALGO
0.999955
4.680576
f59af0d9-777a-4867-aed4-b2be1dbfc317
Stanstring/SXqwq_Competitve_Programming_Code
Luogu_P_4231.cpp
#include <bits/stdc++.h> #define int long long using namespace std; constexpr int N = 10000010; namespace solution { int n,m; int a[N],b[N]; void solve() { cin>>n>>m; while(m--) { int l,r,s,e; cin>>l>>r>>s>>e; int gc = (e-s)/(r-l); ...
ALGO
0.999987
3.205921
3a1394fe-6323-4015-b118-89f4500bf62d
natneam/competitive-programming
706-design-hashmap/706-design-hashmap.cpp
class MyHashMap { public: int arr[1000001]{}; MyHashMap() { std::fill_n(arr,1000001, -1); } void put(int key, int value) { arr[key] = value; } int get(int key) { return arr[key]; } void remove(int key) { arr[key] = -1; } }; /** * Y...
ALGO
0.999068
5.79717
04f25564-c072-4cc8-93f7-e89d1754ca9f
ojasvagupta/Leetcode
1029-vertical-order-traversal-of-a-binary-tree/1029-vertical-order-traversal-of-a-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999997
6.045664
d9aac09b-137e-483c-84bd-3041234de064
LifWirser/VSE_Test
engine/src/cmd/collide2/OPC_Model.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////...
TOOL
0.908197
7.292357
e233f3bd-4f18-4d95-a4e7-6ad52974ebed
jk-jung/problem-solving
codeforces/Codeforces Round 30x/R303_div2_B.cpp
#include <cstring> #include <cstdio> #include <cmath> #include <cassert> #include <set> #include <map> #include <array> #include <stack> #include <queue> #include <vector> #include <numeric> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; typedef pair<int, int> pi; typedef vector<i...
ALGO
0.999989
3.442166
9299f272-5b15-46c4-b092-653e0c1977f0
samek567/ZadaniaAlgorytmiczne
IVOboz-Naukowy-Ilocamp/wycinek_sredniozawansowana100pkt_binary_search_O(N lg N).cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Element { long long wartosc; int idx; bool operator < (const Element &element) const { if (wartosc == element.wartosc) { return idx < element.idx; } return wartosc < elem...
ALGO
0.999903
4.270926
ce278d46-4a1b-4fad-943a-f23a78be4bc7
satishrdd/comp-coding
codeforces/743-B/743-B-26086970.cpp
#include <bits/stdc++.h> using namespace std; //type helpers #define ll long long #define vi vector <int> #define vl vector <ll> #define pii pair<int, int> #define pll pair<ll, ll> #define vpii vector <pii > #define vpll vector <pll > //debugging #define debug(x) cout<<"debugging "<<x<<endl //loops #define FOR(i,a,b...
ALGO
0.998835
3.478697
2de33617-84d3-4b91-8659-6d1a6fb2fa96
jaiswalprabhakar/Leetcode_editorial
Trapping Rain water/trapping_rain_water_brute.cpp
#include <bits/stdc++.h> using namespace std; int getLeft(vector<int> &height , int i){ int longest = 0; for(int b = 0 ; b < i ; b++){ longest = max(longest , height[b]); } return longest; } int getRight(vector<int> &height , int i){ int longest = 0; for(int b = i + 1 ; b < height.size() ; b++){ longest = ma...
ALGO
0.999971
6.108093
7cb6db51-4e6c-48ad-9f6d-c43979539a59
Mokuroh54/Comp_Prog
Codeforces/1501-2000/1601-1700/1681-1690/1688/C_Manipulating_History.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cmath> #include <unordered_map> using namespace std; #define ll long long void solve() { int N; cin >> N; string a[200010]; unordered_map<char, int> l1; for (int i = 1; i <= 2 * N + 1; i++) { cin >> a[i]; for...
ALGO
0.999563
4.481791
13243b87-acdb-4acf-9fef-922286fd3125
LeeYuHwan/AlgorithmQuiz
BeakJoonT/나룻배.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; int main() { int M = 0, t = 0, N = 0; cin >> M >> t >> N; priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> lq; priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> rq; for (int ...
ALGO
0.999948
3.143631
cae57caa-66b4-4b49-bd33-0a2a6ee38a27
nadimnesar/Online-Judges-Accepted-Solutions
Gym/102035E/37893397_AC_15ms_8kB.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define llu long long unsigned int #define endl '\n' #define in insert #define pb push_back #define full(x) x.begin(),x.end() #define iremove(x,y) ...
ALGO
0.999996
4.007766
4b3c8f62-ac54-4b4a-bf73-b54bb73ad0bb
mindnmachine/usaco
bronze/24.1.usaco/bacteriagold2.cpp
#include <bits/stdc++.h> using namespace std; int main() { freopen("bacteria.in", "r", stdin); freopen("bacteria.out", "w", stdout); int numPatch = 0; long long add = 0; long long remove = 0; long long adjustment = 0; long long result = 0; cin >> numPatch; vector<long long> bacteria(numPatch); ...
ALGO
0.999983
3.925494
8372b203-bff4-4407-b0d2-7b5565b0b0be
kuro26/mBipedODE
odelib/ode/src/collision_cylinder_plane.cpp
/* * Cylinder-Plane collider by Christoph Beyer ( <EMAIL> ) * * This testing basically comes down to testing the intersection * of the cylinder caps (discs) with the plane. * */ #include <ode/collision.h> #include <ode/rotation.h> #include <ode/objects.h> #include "config.h" #include "matrix.h" #include "odemat...
ALGO
0.963267
5.06011
31c48457-0247-4601-ade7-a63f566a80ee
How-Will/Data_Structure_and_Algorithm
数据结构与算法图解_杰伊_温格罗/exe9_8.cpp
#include<iostream> using namespace std; int power(int num, int index){ if(index == 1) return num; return power(num, index - 1) * num; } int main(){ cout << power(2, 5) << endl; return 0; }
ALGO
0.999665
5.444057
ea8dc33c-a4fc-4384-903d-2ab63e50bf85
Push55/Control-and-Trajectory-Tracking
Control and Trajectory Tracking/project/pid_controller/eigen-3.3.7/doc/examples/nullary_indexing.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; // [functor] template<class ArgType, class RowIndexType, class ColIndexType> class indexing_functor { const ArgType &m_arg; const RowIndexType &m_rowIndices; const ColIndexType &m_colIndices; public: typedef Matrix<typename ArgType::Scalar, ...
ALGO
0.990466
7.076005
c897f484-d39b-4ba5-9a35-1a706d8932f0
ishandutta2007/codeforces
nantf/normal/713/C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=500050,mod=998244353; #define lson o<<1,l,mid #define rson o<<1|1,mid+1,r #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define ROF(i,a,b) for(int i=(a);i>=(b);i--) #define MEM(x,v) memset(x,v,sizeof(x)) inline int read(){ int x=0,f=0;cha...
ALGO
0.999916
3.567822
3bc2de1f-f971-4da7-bf3b-78c82fde04d6
ABHIRAMvvs/Programming
bank.cpp
#include <iostream> #include <vector> using namespace std; // Function to check if a request can be granted without putting the system into an unsafe state bool banker_algorithm(vector<vector<int>>& need, vector<vector<int>>& allocation, vector<int>& available, int process, vector<int>& request) { // Check if the...
ALGO
0.999427
6.019099
553fa8fc-fbef-4863-a2ab-908acd122fb1
hideinsubtropicalforest/CHESS-Parallel
CHESS/cn/update_decomp.cpp
//=============================================================================================================================== /* update_decomp */ /* */ /* */ /* NAME */ /* update_decomp - */ /* performs decomposition and updates soil/litter */ /* carbon and nitrogen stores */ /* ...
ALGO
0.9979
3.663145
53e4a4c5-5b1e-4126-a0b0-e25aaf6aba7b
horbyn/Roadmap
OJ/PAT/PAT A/A1005.cpp
#include <iostream> #include <string> using namespace std; const int maxn = 1000; int n; int s[maxn]; string str; string hash_trans(int v) { switch (v) { case 1: return "one"; case 2: return "two"; case 3: return "three"; case 4: return "four"; case 5: return "five"; case 6: return "six"; case 7: return "seve...
ALGO
0.999598
5.047822
d82ec232-1474-4141-b5c7-5e47ffaeaafa
ishandutta2007/codeforces
bench0310/normal/1592/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while(t--) { int n; ll h; cin >> n >> h; vector<ll> v(n); for(int i=0;i<n;i++) cin >> v[i]; sort(v.begin(),v.en...
ALGO
0.999535
3.663348
1f58098d-5c28-4758-9232-154b3acf9967
avinashdhakne/LeetCode
206-reverse-linked-list/206-reverse-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* reverseList...
ALGO
0.999724
5.540259
d100b381-1cc7-4796-ad88-52e4f3731583
BhavikDavda/cpp
PRECTICE/PHASE_4/Phase_4_10.cpp
#include <iostream> using namespace std; int sumOfDiagonals(int matrix[][5], int size) { int sum = 0; for (int i = 0; i < size; ++i) { sum += matrix[i][i]; sum += matrix[i][size - i - 1]; } if (size % 2 == 1) { sum -= matrix[size / 2][size / 2]; } return sum; } i...
ALGO
0.999928
5.997212
aa68bcf6-d252-41df-99df-23a47981953a
Jenniiu/Estrutura-de-dados
Ponteiros.cpp
/*a) Escreva uma função "void inverter (double *p, int n)" que inverta a ordem dos "n" elementos do vetor (cujo primeiro elemento é) apontado por "p", ou seja, o último número deve passar a estar na primeira posição, o penúltimo na segunda, etc. Utilize a indexação de ponteiros abordada no final da aula de hoje. //b) ...
ALGO
0.998845
4.094522
c81fe2bb-f7d5-414a-bd7c-c4da6ba880a5
nxplatform/nx-mobile
thirdparty-cpp/boost_1_62_0/libs/math/example/chi_square_std_dev_test.cpp
#include <iostream> using std::cout; using std::endl; using std::left; using std::fixed; using std::right; using std::scientific; #include <iomanip> using std::setw; using std::setprecision; #include <boost/math/distributions/chi_squared.hpp> int error_result = 0; void confidence_limits_on_std_deviation( dou...
ALGO
0.970897
6.674397
cf96f00b-ae2f-4e3e-bc36-db553e7cf0a7
vfolunin/archives-solutions
Kattis/flowergarden.cpp
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <string> using namespace std; vector<int> getPrimes() { const int N = 2e4; vector<int> isPrime(N, 1); vector<int> primes = { 0 }; for (int i = 2; i < N; i++) { if (isPrime[i]) { ...
ALGO
0.99996
4.518287
bc73086f-36b6-41e8-a4b6-3dc85135a71d
deepakbind/codeforces
.history/WrongSubtraction_20230426094954.cpp
#include <bits/stdc++.h> using namespace std; int main() { int x, n; cin >> x >> n; for (int i = 0; i < n; i++) { if (x % 10 == 0) { x = x / 10; } else { x--; } } cout << x; return 0; }
ALGO
0.999931
3.814872
e1cb84d0-307d-4a19-a541-797fd78553d4
ishandutta2007/codeforces
weakesttopology/normal/731/E.cpp
#include "bits/stdc++.h" using namespace std; #define _ ios_base::sync_with_stdio(0);cin.tie(0); #define endl '\n' #define debug(x) cerr << #x << " == " << (x) << '\n'; #define all(X) begin(X), end(X) #define size(X) (int)std::size(X) using ll = long long; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3...
ALGO
0.999932
3.854542
a19bd516-e16c-48c1-b533-6e9ce2e0a215
Rohan-Chinchwade/CppPrograms
countwaytoclimbstairs.cpp
//#include<iostream> //int countWayToClimbStairs(int n) //{ // if(n<0) // return 0; // if(n==0) // return 1; // int count=countWayToClimbStairs(n-1)+countWayToClimbStairs(n-2); // return count; //} //int main() //{ // int n; // std::cout<<"Enter the no of stairs:"; // std::cin>>n; // int count=countWayToClimbStairs(n...
ALGO
0.999759
3.941431
e27b780e-6a05-4439-9f13-836cf1d598a9
siiyayu/Algorithms-specialization
course1/week3_greedy_algorithms/5_collecting_signatures/covering_segments.cpp
#include <algorithm> #include <iostream> #include <climits> #include <vector> using std::vector; struct Segment { int start, end; }; int choose_min_right_segment(const vector<Segment> &segments) { int min_right = 1e10; for (int i = 0; i < segments.size(); ++i) { if (segments[i].end < min_right) {...
ALGO
0.999986
5.017478
64299b3e-a1a4-4950-81be-5a309ebc3407
PiotrPalczewski/Zadania-domowe
zad 8.cpp
#include <iostream> #include <conio.h> using namespace std; int main() { int a; int b; int a1; int b1; cout << "Wpisz pierwsza liczbe" << endl; cin >> a; cout << "Wpisz druga liczbe" << endl; cin >> b; while (a > 0 && b > 0) { a1 = a; b1 = b; while (a1 != b1) { if (a1 > b1) { a1 = a1 - b1; ...
ALGO
0.9979
3.414643
05ba1029-a393-4b3f-8c7c-0886f77a0940
DhruvSingla03/acn_file
go_back_n.cpp
#include <bits/stdc++.h> using namespace std; int main() { int frames, window_size, tot_tr = 0; srand(time(NULL)); cout<<"Enter the number of frames : "; cin>>frames; cout<<"Enter the Window Size : "; cin>>window_size; int i=1; while (i<=frames) { int x = 0; for (int j=i;j<i+win...
ALGO
0.969451
4.538363
34e9e078-a308-4673-8e2a-d9573ad418c3
lucapianzola/Grafo
main.cpp
#include "Grafo.h" #include "iostream" #include <iostream> #include <fstream> using namespace std; template <typename C> ostream & operator << (ostream & salida, const Grafo<C> & grafo) { // Recorremos todos los vertices list<int> vertices; grafo.devolver_vertices(vertices); list<int>::iterator v = vertices.begin...
ALGO
0.99735
3.493135
55fe3959-0c39-4c6a-92d3-15203ea9e988
MsLeen/CplusProject
计算字符串的距离/test.cpp
#define _CRT_SECURE_NO_WARNINGS #include <string> #include<algorithm> #include <iostream> #include <vector> using namespace std; int minDistance(string word1, string word2) { // wordմ֮ı༭Ϊwordij if (word1.empty() || word2.empty()) { return max(word1.size(), word2.size()); } int len1 = word1.size(); int len2 = wo...
ALGO
0.999898
4.210198
f7d5ed7f-0255-4118-a188-b47c33984ed2
tsunghuanghsieh/leetcode
problems/divide-array-in-sets-of-k-consecutive-numbers/Solution.cpp
#include <iostream> #include <map> #include <vector> using namespace std; class Solution { public: // LC Editorial soln #1: map Runtime O(nlogn + nk) Space O(n) // LC Editorial soln #2: map + queue Runtime O(nlogn + n) Space O(n) // LC Editorial soln #3: unordered_map Runtime O(n) Space O(n) // //...
ALGO
0.999827
5.676044
ec8eb7c8-32d5-421c-8013-1066d07a9ae3
SoumadeepBagui409/LeetcodeSolution
881-boats-to-save-people/881-boats-to-save-people.cpp
class Solution { public: int numRescueBoats(vector<int>& people, int limit) { sort(people.begin(),people.end()); int count=0; int i=0,j=people.size()-1; while(i<=j){ if(i==j){ count++; break; } if(people[i]+people[...
ALGO
0.999995
5.92337
2c19bc2c-048d-4684-8b03-6538ecd2d10d
raazshrestha9876/data-structure-and-algorithms
sorting/selection-sort.cpp
#include <iostream> using namespace std; void selectionSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { int smallestIndex = i; for (int j = i + 1; j < n; j++) { if (arr[j] < arr[smallestIndex]) { smallestIndex = j; } ...
ALGO
0.999991
5.417333
d8422860-ef0b-4125-85e5-de79be105ca5
Alonefcp/Leetcode-problems-solutions
Problems/3285.FindIndicesOfStableMountains.cpp
#include <vector> using namespace std; /* There are n mountains in a row, and each mountain has a height. You are given an integer array height where height[i] represents the height of mountain i, and an integer threshold. A mountain is called stable if the mountain just before it (if it exists) has a height strictl...
ALGO
0.999996
6.938004
feaecb5d-a0d0-4d32-a683-eb5d8d4fcb80
raincross7/code-similarity
codes/train_code/problem488/problem488_151.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; using namespace std; // typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> indexed_set; // typedef tree<int,int,less<int>,rb_tree_tag,tree_order_statistics_node_update> indexed_map; #define ...
ALGO
0.999973
4.423112
b82a5b12-6274-415d-af53-d1e787f11264
raincross7/code-similarity
codes/train_code/problem275/problem275_242.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define rep(i, a, n) for (int i = a; i < n; ++i) int main() { int w, h, n; cin >> w >> h >> n; int x1 = 0, y1 = 0; rep(i, 0, n) { int x, y, a; cin >> x >> y >> a; if (a == 1) { x1 = ...
ALGO
0.999762
4.191926
d04316f3-c0ef-4b2e-b497-a96c73ae9183
shubhansu-kr/DailyChallenge-2025-LeetCode
05_May_2025/15_LongestUnequalSubSeqII.cpp
// https://leetcode.com/problems/longest-unequal-adjacent-groups-subsequence-ii/?envType=daily-question&envId=2025-05-16 #include <bits/stdc++.h> using namespace std ; auto init = []() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); return 'c'; }(); class Solution { public: bool differByOneCh...
ALGO
0.999974
5.542066
dd55d9ac-47c0-402c-96ca-733898fe586e
ShallowFeather/MyCTFChallenge
AIS3_2024/Checker/Checker/Checker/Checker.cpp
#include <iostream> #include <string> #include <Windows.h> #define IOCTL_TEST(code) CTL_CODE(FILE_DEVICE_UNKNOWN, code, METHOD_BUFFERED, FILE_ANY_ACCESS) class IOCTL { public: IOCTL() {} ~IOCTL() {} struct Buffer { char flag[33]; }; int DriverCheck(int check, std::string flag) { HANDLE Device = CreateF...
TOOL
0.900627
3.447322
f0afc2ac-2629-40d8-9c80-0751718192dd
Ranjithkumar8489/CPP
ARRAY/Matrix_addition_Subtraction.cpp
#include <iostream> using namespace std; #define N 4 void additon (int A[N][N], int B[N][N], int C[N][N]) { for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { C[i][j] = A[i][j] + B[i][j]; } } } void Subtraction (int A[N][N], int B[N][N], int D[N][N]) { for (int i = 0; i < N; i++) { for...
ALGO
0.999451
3.95273
697dd00b-4744-46fb-a7d1-4612c7bbd2f1
AmitrajitDas/DSA-CP
0136-single-number/0136-single-number.cpp
class Solution { public: int singleNumber(vector<int>& nums) { int res = 0; /* XOR of two same numbers is always 0 & XOR of a number with 0 will result in the number itself */ for(auto &it : nums) res ^= it; return res; } };
ALGO
0.999973
5.714329
4b91ab32-5b21-4b76-96e9-b03c988b231e
parth-1372/45-DSA
Day 23/Find Eventual Safe State.cpp
#include <vector> #include <unordered_map> #include <set> #include <algorithm> using namespace std; class Solution { public: struct pair_hash { template <class T1, class T2> std::size_t operator () (const std::pair<T1, T2> &p) const { auto h1 = std::hash<T1>{}(p.first); auto...
ALGO
0.999972
6.318283
63b9b784-42df-49e9-81c1-2fbccb65f86c
alexpopovici0/metin2server-project
src/etc/boost_1_72_0/libs/iterator/example/shared_iterator_example1.cpp
#include "boost/shared_container_iterator.hpp" #include "boost/shared_ptr.hpp" #include <algorithm> #include <iostream> #include <vector> typedef boost::shared_container_iterator< std::vector<int> > iterator; void set_range(iterator& i, iterator& end) { boost::shared_ptr< std::vector<int> > ints(new std::vector<i...
TOOL
0.930159
3.395585
4924b426-e74c-4232-b865-dbb50a305f9e
ishandutta2007/codeforces
sevenkplus/normal/1078/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> PII; typedef double db; #define fi first #define se second #define mp make_pair #define pb push_back #define pct __builtin_popcount #define N 100010 const PII full(-1, -1); int n; PII a[N]; PII f[17][N*4]; // union PII gg(P...
ALGO
0.999868
3.61811
e1aa5638-b317-4e7d-9bfd-3dff7a63cb5a
LittleLittleLi97/PAT
Second PAT A 1007 - Maximum Subsequence Sum/Second PAT A 1007 - Maximum Subsequence Sum/main.cpp
#include <iostream> #include <stdio.h> #include <vector> using namespace std; int K; struct Node { int i; int j; }; vector<int> vIn; vector<Node> vRecord; int dp[10010]; int main() { scanf("%d", &K); for (int i = 0; i < K; i++) { int t; scanf("%d", &t); vIn.push_back(t); } ...
ALGO
0.999965
3.661009
7223006d-2995-4964-a0b9-bfbffc000ca2
JasminChaudhary/LoyaltyWallet
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998799
6.776823
8f25a550-2bdd-4dba-9ae9-9a4c0e13894a
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_7143_9.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using s = int16_t; vector<s> su[3001]; bool reach[3001][3001]; s step[3001][3001][13]; void dfs(int r, int f) { if (reach[f][r]) return; reach[f][r] = true; for (const auto &s : su[r]) dfs(s, f); } s go(s from, s to, int dis) { if (step[from][t...
ALGO
0.999947
4.271482
d53b6e3c-b985-4fac-9535-d3711c61315e
bmazuc/LumEngine
Libs/imgui-master/examples/libs/assimp-master/code/PostProcessing/SplitLargeMeshes.cpp
/** * @file Implementation of the SplitLargeMeshes postprocessing step */ // internal headers of the post-processing framework #include "SplitLargeMeshes.h" #include "ProcessHelper.h" using namespace Assimp; // ------------------------------------------------------------------------------------------------ Split...
TOOL
0.948532
6.945347
0d212181-432d-4733-a0da-ef81829f5656
arun-iitg025/DS_Algo-IIT-guwahati
cpp/deletelinkedlist.cpp
#include<iostream> #include<map> using namespace std; class node{ public: int data; node* next; // constructor node(int data){ this->data = data; this->next = NULL; } // destructor ~node(){ int value = this->data; // memory free if(this->next!=NULL){ delete next; this->next = NULL; }...
ALGO
0.999368
4.191256
82313058-f7bf-46c1-b460-37ded6860237
SysteM1922/projeto-tai-1
group_2/src/mutate.cpp
#include <iostream> #include <fstream> #include <unistd.h> // for getopt #include <unordered_set> #include <cstdlib> // for rand() and srand() #include <ctime> // for time() using namespace std; // Function to perform mutation on a character based on probability and distinct letters char mutateCharacter(char ch, do...
ALGO
0.999334
7.06965
0c4d10cb-dfd5-42b1-a9e4-bd98385e2914
Overstars/Practice
OJ/Project Euler/1.Multiples of 3 and 5.cpp
#include<bits/stdc++.h> using namespace std; int main() { long long ans=0; for(long long i=1;i<1000;i++) { if(i%3==0||i%5==0) ans+=i; } cout<<ans<<endl; return 0; }
ALGO
0.999929
3.745849
45410f62-53f0-4130-b08a-dd3bbabd834b
gossac/computer_graphics
deps/assimp/code/Common/SGSpatialSort.cpp
/** @file Implementation of the helper class to quickly find vertices close to a given position. Special implementation for the 3ds loader handling smooth groups correctly */ #include <assimp/SGSpatialSort.h> using namespace Assimp; // --------------------------------------------------------------------------------...
ALGO
0.999104
7.004708
5db5e4c3-684a-4b82-b5a8-059861ff64fc
43H1-BOI/CPP-Language
Practice/9_OOPs/Polymorphism/Operator Overloading/+_Operator_Overloading.cpp
#include <iostream> using namespace std; // Program to Add Two Complex Numbers using Operator Overloading class Complex { private: float real , imag; public: Complex( ){ real = 0; imag = 0; } void getData( ){ cout << "Enter Real Part of Complex Number (a): "; cin >> real...
ALGO
0.859236
4.90276
0c347193-5729-4772-a4a0-3c57aa7fc677
tcoderwang913/algorithmic_study
JumpGame.cpp
/** Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. For example: A = [2,3,1,1,4], return true. A = [3,2,1,0,4], return false. 一维...
ALGO
0.999905
5.837303
60b6fdf0-b6f7-4310-bf80-ef1de5bcaaf1
NikoSoftware/Algorithm
ACM solved the question with Corresponding number/cheshi.cpp
#include <iostream> #include <stdio.h> #include<string.h> #include <cmath> #include <algorithm> using namespace std; int b[500005], c[500005]; int n; struct node { int num, id; }a[500005]; bool cmp(node a, node b) { return a.num < b.num; } void update(int i, int x) { while(i <= n) { c[i] += ...
ALGO
0.999878
3.576785
c87bf098-93ce-4c8b-9913-c0636e5dd885
danielvallejo237/Algorithm_Analysis_Descrete_Math
Ejercicios/parray.cpp
#include<bits/stdc++.h> #define ll long long #define blocksize 500 using namespace std; ll power=0; class Query { public: ll l; ll r; ll i; Query(){} Query(ll l, ll r, ll i) { this->l=l; this->r=r; this->i=i; } bool operator < (const Query &p) { ...
ALGO
0.999817
3.905275
8e5083b8-35da-4f24-a47f-243fa23f0dd9
ayyappareddynandipati/GFG
Difficulty: Medium/Geeks And The String/geeks-and-the-string.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: string removePair(string s) { // code here string res=""; for(char ch : s){ if(!res.empty() && res.back()==ch){ res.pop_back(); }else...
ALGO
0.998774
5.746548
b1e19e57-c6c8-4b24-9c6f-7b96003bd554
Koi-TF2/team-comtress-2-backup-june-5th-2022
src/ivp/havana/havok/hk_math/densematrix.cpp
#include <hk_math/vecmath.h> #include <hk_math/densematrix.h> #include <hk_math/vector_fpu/vector_fpu.h> void hk_Dense_Matrix::mult_vector( hk_real *x_vector, hk_real *result_vector ) const { int i; for(i=getNumRows()-1;i>=0;i--) { result_vector[i]=0.0f; } hk_real *start_column=&m_elt[m_lda*getNumC...
ALGO
0.896384
4.141468
0b8d4a9f-9f3f-49cd-ab8a-ef84a9ef35a1
subratamondalnsec/Pw-cpp-code
12diving into mathematics/04Prime & math/dpp/02Find_a_to_the_power_b_to_the_power_c_to_the_power_d.cpp
#include <bits/stdc++.h> using namespace std; long long pow(long long a, long long b, long long m) { long long ans = 1; while (b>0){ if((b & 1)!=0) ans = ((ans%m) * (a%m)) % m; a = ((a%m) *(a%m)) % m; b=b>>1; } return ans; } int main() { long long a, b, c,d; cin >> a >> b >> c>> d; const long l...
ALGO
0.999957
5.868922
7a5d8099-7e38-4e3d-85a6-dd73d32d8ecc
Ruchit-rt/fgpa_hardware_accelerateNN
dependencies/opencv-4.5.3/3rdparty/carotene/src/median_filter.cpp
#include "common.hpp" /* * The code here is based on the code in * <http://ndevilla.free.fr/median/median/src/optmed.c>, which is in public domain. * See also <http://ndevilla.free.fr/median/median/index.html>. */ namespace CAROTENE_NS { #ifdef CAROTENE_NEON namespace { uint8x16_t getLeftReplicate(uint8x16_...
ALGO
0.998397
6.723718
f22a7f3b-69a2-4e03-b112-489e8415c8e8
Daipuwei/JianZhiOffer
JZ07-斐波那契数列/JZ7.cpp
#include <iostream> using namespace std; class Solution { public: int Fibonacci(int n) { if (n <= 0){ return 0; }else if (n == 1){ return 1; }else{ return Fibonacci(n-1)+Fibonacci(n-2); } } }; int main() { int n; cin>>n; Solution s; cout<<s.Fibonacci(n); return 0; }
ALGO
0.999761
5.378849
3a08fc90-de15-4eea-8d01-e8a233905fba
Rudraksha-007/DS-Lab-Work-Mtech-IT-3rd-sem
DS/lab 2th nove/tree.cpp
#include<bits/stdc++.h> using namespace std; struct node{ int data; node*left,*right; node(){ left=right=nullptr; } node(int n) { data=n; left=right=nullptr; } }; class BST{ node*root; public: BST(){ root=nullptr; } BST(int x){ root->d...
ALGO
0.999877
3.997376
e0f56f7c-c01c-498d-a0b4-bb5464db4103
Princepm02/CPP
Basics/Lowercase and Uppercase/lower_upper.cpp
// Find given character is Uppercase or LowerCase #include <iostream> using namespace std; int main() { char ch; cout << "Enter Character: "; cin >> ch; if (ch >= 'A' && ch <= 'Z') // OR use => if (ch >= 65 && ch <= 90) ASCII Value { cout << "Uppercase"; } else if (ch >= 'a' && ch <...
ALGO
0.997933
4.881193
9f1c44b6-812e-4e9b-a09d-3d12b775b236
victorsenam/treinos-old
victorsenam/ojs/spoj/permut1/permut1.cpp
#include <bits/stdc++.h> using namespace std; typedef int num; #ifndef ONLINE_JUDGE #define debug(...) fprintf(stderr, "%3d| ", __LINE__); fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n") #else #define debug(...) // #endif #define N 13 #define K 100 int n, k, t; int memo[N][K]; int pd(int n, int k) { if (n =...
ALGO
0.999833
4.308322
c75c3bbe-86af-47c8-bc27-0ee7f09fa467
ganeshalamuru/prg
codeforces/edu/TwoPointers/step3/problems/E.cpp
#include <bits/stdc++.h> using namespace std; #define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); typedef long long ll;typedef long double ld;typedef pair<int,int> pii; #define F first #define S second #define PB push_back #define MP make_pair const ll mod = 1e9+7, N = 2e6+7, M = 2e6+7, INF = INT_MAX/10; ll po...
ALGO
0.997067
3.996643
b4cee1ba-012b-4d66-ab03-d1a33683ae45
ishandutta2007/codeforces
dario2994/normal/1446/C.cpp
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long ULL; #define SZ(x) ((int)((x).size())) template <typename T1, typename T2> string print_iterable(T1 begin_iter, T2 end_iter, int counter) { bool done_something = false; stringstream res; ...
ALGO
0.999915
4.505544
e41447f4-5559-4da6-8ed5-a1a7526a6557
cielavenir/procon
hackerrank/service-lane.cpp
#include <algorithm> #include <cstdio> #define REP(i,n) for(int i=0;i<(int)n;++i) using namespace std; int *buildRMQ(int *a, int n) { int logn = 1; for (int k = 1; k < n; k *= 2) ++logn; int *r = new int[n * logn]; int *b = r; copy(a, a+n, b); for (int k = 1; k < n; k *= 2) { copy(b, b+n, b+n); b += n; ...
ALGO
0.999981
4.254987
bbe3d8d5-d8b0-4f8f-a3d9-487ac41b396d
McNexor/APRG-GameOfLife
gol.cpp
#include "gameoflife.h" #include "Timing.h" #include<omp.h> #include<iostream> struct Config { std::string inputFile; std::string outputFile; int generations; bool openmp; int threadnum; bool measure; }; Config parseArguments(int argc, char* argv[]) { Config config; for (int i = 1; i ...
ALGO
0.99752
5.534815
d4e9277c-6edf-4e39-b029-b79fe042ac18
mayank3810/cpp-learning
ProblemSolving/mayank_encryptstring.cpp
#include<iostream> #include<string> using namespace std; int main(){ string s; char temp; cin>>s; int n = s.size(); for (int i = 0; i < n/2; i++) { temp = s[i]; s[i] = s[n-i-1]; s[n-i-1] = temp; } for (int i = 0; i < n; i++) { if(s[i] == 'a'){ ...
ALGO
0.999684
3.364583
241b5722-39ec-4dc8-ae32-7b3734276eb9
PhuocVinhLee/LuanVan_CNTT
online_exam_system_backend/temp/3xiry0m.cpp
#include<stdio.h> int add(int a, int b) {return a+b;} int main() { printf("%d", add(-4, 1)); return 0; }
TOOL
0.853615
3.759009
2eead954-f328-4189-93de-07669455b068
zhouhaoyuan123/c-_school_work
problems/luogu.com.cn/Mersenne_number.cpp
#include <iostream> #include <cstring> #include <string> #include <cmath> using namespace std; const int maxn = 505;//max len; /*times_num_simple XXXXXX * X move_left XX -> XX0 times_num XXX * XXX */ int a[maxn + 5],b[maxn+5],ans[maxn+5],ans3[maxn+5]; int times_num_simple(int a[],int lena,int b,int ans[]) { //mem...
ALGO
0.999779
3.415001
45a53925-50ea-40de-b03f-df14b13d6052
eren-mikasa/Leetcode-Parctice
Striver Sheet/Day-19/Symmetric Tree.cpp
/* Symmetric Tree ============== Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center). Example 1: Input: root = [1,2,2,3,4,4,3] Output: true Example 2: Input: root = [1,2,2,null,3,null,3] Output: false Constraints: The number of nodes in the tree is in the rang...
ALGO
0.999873
6.890432
d96920e5-91b1-4329-83bb-8422106d6866
DeCalvin2006/Codeforces
Contests/1093/c/c.cpp
/* * Author : AFGXF * Date : 2022-07-03 09:30:23 * */ #include <bits/stdc++.h> using namespace std; const int MAXN = 2E5 + 10; long long n; long long b[MAXN]; long long a[MAXN]; int main() { cin >> n; a[0] = 0; a[n + 1] = 1E18 + 10; for (int i = 1; i <= n / 2; i++) { cin >> b[i]; a[i] = a[i - 1]; ...
ALGO
0.999993
3.310303
f151cf44-7536-471b-963e-ffcbbd0e2f48
Ayush-S-Rawat/CodSoft
Practice/Segmented_Seive.cpp
#include <bits/stdc++.h> #include <iostream> using namespace std; void seive(int n) { int size=floor(sqrt(n)); int low=2; int high=size-1; vector<int> prime; while(low<n) { if(high>=n) high=n; vector<int> arr(high-low+1,1); for(int i=0;i<prime.s...
ALGO
0.999659
4.706395
9ca4a840-5848-4d6c-aabd-4a64666bbfda
ElijahWandimi/PolygonTransformer
Polygon3D.cpp
#include<iostream> #include<vector> #include<random> using namespace std; class Polygon3D { protected: string name; vector<double> xCood; vector<double> yCood; vector<double> zCood; void showPolygon() { cout<<"\n**********\n" <<name <<"= polygon("; ...
ALGO
0.87133
4.948019
2d91a69f-261b-4105-b129-5fb632276407
alifrommars/Introduction-to-programming
Sem_08/Numeric systems/BinaryToDecimal.cpp
#include <iostream> using namespace std; unsigned int toDecimal(unsigned long long n) { unsigned int decimalNum = 0; unsigned int multiplier = 1; while (n != 0) { decimalNum += (n % 10 * multiplier); multiplier *= 2; n /= 10; } return decimalNum; } int main() { cout << toDecimal(10111); }
ALGO
0.992434
3.891662
67e073cc-3682-40a4-99cc-f07ccc7c37b3
priyanshimaurya/Linklist-solutions
middlenode.cpp
#include<iostream> using namespace std; class Node{ public: int val; Node* prev; Node* next; Node(int data){ val=data; prev=NULL; next=NULL; } }; class doublelinklist{ public: Node* head; Node* tail; doublelinklist(){ head=NULL; tail=NULL;...
ALGO
0.999834
5.079166
e00f9b4f-9849-4cdc-85cf-45b0d2f96cab
venkatesh-narayan/programming-challenges
C++/superinteger/superinteger.cpp
#include <iostream> #include <string> #include <vector> using namespace std; template<typename T> T digital_root(T x) { string s = to_string(x); T sum = 0; for (string::iterator it = s.begin(); it != s.end(); it++) sum += *it - 48; if (s.size() == 1) return sum; else return digital_root(sum); } template<ty...
ALGO
0.999136
4.693307
d89173dd-f5f8-41ba-b360-e9d4fa648362
shangli-cuc/ACM
1011/1011_2.cpp
// 1011_2.cpp : ̨Ӧóڵ㡣 // #include<iostream> using namespace std; int main() { int w; cin >> w; if (w < 1 || w>100) return 0; if (w == 1 || w == 2) cout << "NO" << endl; else if (w % 2 == 0) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
ALGO
0.999593
3.478767
6881eef8-af3f-42ea-9925-c563cd5dc140
llvm-faultinjector/llvm-fault-injector
lib/CodeGen/LiveInterval.cpp
#include "llvm/CodeGen/LiveInterval.h" #include "LiveRangeUtils.h" #include "RegisterCoalescer.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator_range.h" #include "llvm/CodeGen/LiveIntervals.h" #include "llvm...
TOOL
0.995828
7.942347
88e1fe69-0f84-4554-aa0d-8d67e4ad779a
Aayush2492/Codeforces-Problems
Live/23-12-2023/B.cpp
#include <bits/stdc++.h> using namespace std; using LLI = long long int; template <typename T> using VEC = vector<T>; template <typename T> using VV = VEC<VEC<T>>; template <typename T> using PTT = pair<T, T>; #define FOR(i, n) for (int i = 0; i < n; i++) #define ROF(i, n) for (int i = n - 1; i >= 0; i--) templat...
ALGO
0.998644
3.043923
b9612fba-88f3-462d-95e5-cb398e087ada
Soni-Shivam/CS101
week12/rajsimran.cpp
/* Raj is eager to meet Simran, who lives at the end of a magical path of length n (with Raj being at position 0 and Simran at position n-1). At each step along the way, one can jump ahead one or more steps. An array jumps of length n tells Raj how far he can jump forward when he is at position i. Specifically, from po...
ALGO
0.999963
5.302027
807ad18c-7c1b-4086-9443-4444bbd409d5
AAstolfo/DPASTOLFODPP
石子区间dp.cpp
#include<iostream> #include<algorithm> #include<cstring> using namespace std; const int N =3e2+10; int s[N]; int f[N][N]; int main() { int n; cin>>n; for(int i=1;i<=n;i++) scanf("%d",s+i); for(int i=1;i<=n;i++)s[i]+=s[i-1]; for(int j=2;j<=n;j++) for(int i=1;i+j-1<=n;i++) { int l=i,r=i+j-1; f[l][r]=1e...
ALGO
0.999705
3.220274
8da5158a-a256-491c-9826-c14ac8469111
sazid/codes
problem_solving/codeforces/151A.cpp
#include <bits/stdc++.h> using namespace std; /** * n friends * k bottles * 1 bottle has l milliliters drink * c limes * 1 lime into d slices * p grams of salt * to make a toast * - nl millilitres of drink * - np grams of salt */ int main() { return 0; }
ALGO
0.990248
3.084579
a2573773-d4e2-4d69-87db-1afae60995da
sachit288/AI-LAB
BeamSearch_Qu.cpp
#include <bits/stdc++.h> using namespace std; void beam_op(vector<vector<int>> &mtx, int s, int n, vector<int> &vi, int w) { queue<int> open; open.push(s); vi[s] = 1; while (open.empty() != 1) { int a = open.front(); cout << open.front() + 1 << " "; open.pop(); for ...
ALGO
0.999979
4.284952
2580f3f0-5980-4e0b-b511-6201dda53d03
havingfun2/AlgorithmAndDS
algorithm/julka.cpp
# include<iostream> # include<string.h> using namespace std; int main() { int n=10; while(n--) { char t[101],m[101]; int k[200]; cin>>t>>m; int l1, l2, a, j=199, l=1, sum=0, o, b, y, i, rem=0, z=0; l1=strlen(t); l2=strlen(m); i=l2-1; o=l1-1; while(i>=0) { a=t[o]-'0'; b=m[i]-'0'; y=a+b+su...
ALGO
0.999988
3.350479
8d3e2da4-95b7-4ed9-b0a9-1d826bf19171
ishandutta2007/codeforces
turmax/normal/1506/C.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int t; cin>>t; while(t--) { string s1,s2; cin>>s1>>s2; int ans=s1.size()+s2.size(); for(int l=1;l<=min(s1.size(),s2.size());+...
ALGO
0.999955
5.112616
76dd8557-4caa-4596-9797-3e422d70affd
xenowits/cp
practice/makeItconnected.cpp
#include <bits/stdc++.h> using namespace std; #define fori(i,a,b) for (long long int i = a; i <= b ; ++i) #define ford(i,a,b) for(long long int i = a;i >= b ; --i) #define mk make_pair #define mod 1000000007 #define pb push_back #define ll long long #define MAXN 100001 #define rnd mt19937_64 rng(chrono::high_resolutio...
ALGO
0.999936
4.062182
9f464b81-96fc-4078-b9e1-65a1a9163aee
pashayevan/full-sem3
2okt/2okt1.cpp
#include <iostream> #include <algorithm> #include <vector> int main() { std::vector<int> data{100,42,12,80,0}; std::sort(data.begin()+1,data.end()-1); for(const auto& el:data) { std::cout<<el<<' '; } return 0; }
ALGO
0.999693
4.414923