uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ae5634a6-3876-485d-b158-0bb75506196a
ricchardo/Tarea1
main.cpp
#include "Evaluador.h" #include <iostream> using namespace std; //Devuelve la suma de a (dado) y b (dado) int sumar(int a, int b) { return a+b; } //Devuelve la resta de a (dado) y b (dado) int restar(int a, int b) { return a-b; } //Devuelve la multiplicacion de a (dado) y b (dado) int multiplicar(int a, int ...
ALGO
0.873392
3.64891
ca080690-a5af-45fd-8574-47fd414aa581
Samiatrix/Leetcode-Problems
rotting-oranges/rotting-oranges.cpp
class Solution { public: bool isSafe(vector<vector<int>>& grid, int x, int y){ return x<grid.size() && x>=0 && y>=0 && y<grid[x].size() && grid[x][y] == 1; } int orangesRotting(vector<vector<int>>& grid) { queue<pair<int, int>> q; int fresh = 0; for(int i=0;i<grid.size();i++)...
ALGO
0.999975
6.203667
069e551e-b5e7-4b4d-8973-8c406bfb6750
ishandutta2007/codeforces
kmjp/normal/1051/F.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999953
4.343391
36a709db-1e34-41b2-b65d-bd2a54532bc5
marvalarva2929/Competitive_Programming
Codeforces/Problems/466C.cpp
#include <vector> #include <iostream> #define int long long #define nl '\n' using namespace std; int32_t main() { int n, t = 0; cin >> n; vector<int> nums(n + 1); vector<int> count(n + 1); for (int i = 1; i <= n; i++) { cin >> nums[i]; t += nums[i]; } if (t % 3 != 0) { ...
ALGO
0.999975
4.269481
09cac96c-9bc0-446c-9625-8d33d9eac059
ishandutta2007/codeforces
xyf007/normal/1593/A.cpp
#include <algorithm> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <tuple> #include <unordered_map> #include <unordered_set> template <typename T> void checkmax(T &x, T y) { if (x < y) x = y; } template <typename ...
ALGO
0.999839
4.229503
0d0284c4-ba38-4935-9ac6-1d9b85cdfe4b
samar-gupta/DSA_POTD
Leetcode/Move Pieces to Obtain a String.cpp
//Leetcode Link : https://leetcode.com/problems/move-pieces-to-obtain-a-string //Approach-1 (Brute Force to check all possibilities) //T.C : Exponential in the worst case due to exploring all possible swaps, though memoization reduces redundant computations. //S.C : Memoization map to store all possible states. ~ O(n^...
ALGO
0.999974
6.37029
6a890f1f-89b1-4255-9d9f-1f25f4c2a261
juneharold/USACO
usaco_practice/bronze/bronze_A/A5_complete_search/snow_white.cpp
// 백설 공주와 일곱 난쟁이 #include <iostream> #include <algorithm> #include <string> using namespace std; int main() { int dwarfs[9]={}, sum=0; for (int i=0; i<9; i++) { cin >> dwarfs[i]; sum += dwarfs[i]; } // double nested loop subtract for (int a=0; a<9; a++) { for (int b...
ALGO
0.999631
3.214392
6eaf67fd-1644-4c80-8fdd-1861b8f191d7
wgsylcl/OI-Template
docs/DP/code/P5904.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define int ll typedef long long ll; typedef const int cint; constexpr int MAXN = 1e5 + 10; int n, dep[MAXN], son[MAXN]; vector<int> e[MAXN]; ll *f[MAXN], *g[MAXN], p[MAXN << 2], *idx = p, ans; void dfs(cint u, cint fa) { for (cint v : e[u]) if...
ALGO
0.99972
4.285659
57b158d6-8c78-4937-8c12-195fa09dff87
aminul9/Uri_OJ
1294.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { freopen("input.txt","r",stdin); double length,width; while(cin>>length>>width) { double small=min(length,width); double a=12,x=0; double b=-(4*length)-(4*width); double c=length*width; double numeratorSq...
ALGO
0.999619
3.260731
0a318175-9eec-4fa5-98b7-8e3ac5faae1b
Amit-45/cpp-data-structures
arrays/check if array is sorted/optimised.cpp
//Program to check whether an array is sorted or not (Optimised solution) #include<bits/stdc++.h> using namespace std; bool isSorted(int arr[], int n) { for(int i=0;i<n;i++) for(int j=i+1;j<n;j++) if(arr[j]<arr[i]) return false; return true; } int main() { int n; cin>>n; ...
ALGO
0.999908
4.280707
70e42cc4-9739-44c3-9c7b-a5a5acbd60f2
mccnudt/cplus
test3-14.cpp
#include<iostream> #include<vector> using namespace std; int main(){ string s; string sword; vector<string> str; cout<<"输入一段字符:"<<endl; getline(cin,s); s=s+' '; for(string::size_type ix=0;ix!=s.size();++ix) { if(isspace(s[ix])||ispunct(s[ix])){ int count=0; ...
ALGO
0.990625
3.310055
5972bae7-3b4a-4f4c-ba70-a835e8460997
sahilwep/DSA-Workspace
Leetcode/Easy/1929_Concatenation_of_Array.cpp
/* // 1929. Concatenation of Array https://leetcode.com/problems/concatenation-of-array/description/ // Input: 2 3 1 2 1 4 1 3 2 1 // Output: 1 2 1 1 2 1 1 3 2 1 1 3 2 1 */ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> pi; #define ...
ALGO
0.999718
4.065561
28e5842d-aaf3-483b-b1b5-08a842e3d45c
noureldien/RecommenderSystem
BPTF/PTF_Reconstruct.cpp
#include "mex.h" #include "./lib/ex-utils.h" void CheckInput(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { /* Check for proper number of arguments. */ if (nrhs != 4 || mxGetClassID(prhs[0]) != mxINT32_CLASS || mxGetClassID(prhs[1]) != mxDOUBLE_CLASS ||mxGetClassID(prhs[2]) != mxDOUBLE_CLASS || mxGe...
ALGO
0.998034
3.878261
700688f6-6cc9-4794-abd2-c9c0664e5d59
capstone-engine/llvm-capstone
libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp
// <algorithm> // UNSUPPORTED: c++03, c++11, c++14, c++17 // template<class T, output_iterator<const T&> O, sentinel_for<O> S> // constexpr O ranges::fill(O first, S last, const T& value); // template<class T, output_range<const T&> R> // constexpr borrowed_iterator_t<R> ranges::fill(R&& r, const T& value); #inc...
TEST
0.873918
7.483316
d7dfab04-953b-4c8b-b1ce-2f0dec56e14a
codermdshakil/cpp-w-1-1
dynamic_memory_declaration.cpp
#include <bits/stdc++.h> using namespace std; int main() { // dynamic variable declaration // int *a = new int; // * a = 5; // cout << *a << endl; // delete a; // delete dynamic memory // dynamic array declaration int *a = new int[5]; a[0] = 10; a[1] = 20; a[2] = 30; a[3...
ALGO
0.941381
3.206272
80c33478-bc8c-4fc3-9097-e09de346a75d
Jiya-garg9971/-6Companies30days
Amazon/1) Shuffle an array.cpp
class Solution { public: vector<int> v; vector<int> ans; int n=0; Solution(vector<int>& nums) { v=nums; n=nums.size(); } vector<int> reset() { return v; } vector<int> shuffle() { ans=v; for(int i=0;i<n;i++){ int idx=rand()%(n-i); ...
ALGO
0.999777
6.240142
111eccd0-4c84-4b96-9e57-8171d4efa917
Lufan/learn
stepic_453_alg_cpp/s4.cpp
/* Число разбиений на слагаемые По данному целому числу 1≤n≤1000 найдите число способов представить n в виде суммы положительных целых чисел. Выведите данное число по модулю 10^9+7. Два представления, отличающиеся друг от друга только порядком слагаемых, считаем одинаковыми. Sample Input: 5 Sample Output: 7 */ #in...
ALGO
0.999983
5.197953
9d8054a7-aeac-4b79-9ad1-844ac64c5f5b
fed-gren/Algorithm
programmers/level1/p12937.cpp
#include <string> #include <iostream> using namespace std; string solution(int num) { string answer = ""; if (num % 2 == 0) answer = "Even"; else answer = "Odd"; return answer; } int main() { string ans = solution(3); cout << ans << "\n"; //Odd ans = solution(4); cout << ans << "\n"; //Even }
ALGO
0.999867
5.434995
5a971a8c-0f7b-4ec9-a528-11df011d7fcf
a446187673/Cpp-LeetCode
19. Delete the penultimate node of the linked list.cpp
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; //19. 删除链表的倒数第 N 个结点 https://leetcode.cn/problems/remove-nth-node-from-end-of-list/ struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ...
ALGO
0.999881
5.611227
1fdcb400-5ac8-458a-aaa2-f25ce36aa667
DevJSter/dsa
Interview_DS_Algo/Graph/BFS_DFS/Most Stones Removed with Same Row or Column.cpp
/* MY YOUTUBE VIDEO ON THIS Qn : https://www.youtube.com/watch?v=ZsGTpXm966E Company Tags : Google Leetcode Link : https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/ Please see the "Disjoint Set" solution : https://github.com/MAZHARMIK/Interview_...
ALGO
0.999567
6.213531
31beb636-b5a8-4704-b4f0-984a5ee0c731
yashtekade21/LeetCode_Solved
2375_Construct_Smallest_Number_From_DI_String.cpp
class Solution { public: string smallestNumber(string pattern) { int n = pattern.length(); string result = "", st = ""; int counter = 1; for (int i = 0; i <= n; i++) { st += ((counter++) - '0'); if (i == n || pattern[i] == 'I') { while (!st.e...
ALGO
0.999957
5.907082
0c460104-49f7-4116-9e62-d0e9e0572685
DeNRaiM/testtest
src/USER-EFF/fix_nve_eff.cpp
/* ---------------------------------------------------------------------- Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ #include <cstring> #include <cstdlib> #include "fix_nve_eff.h" #include "atom.h" #include "force.h" #include "...
ALGO
0.998815
6.61251
d93adcc8-c74d-4944-866c-381d9d488336
sabeelkhan99/HackerBlockAssignment
sqrt.cpp
#include<iostream> using namespace std; int main(){ float ans=0; int n; int precision; cin>>n>>precision; float inc=1; int current_precision=0; while(current_precision<=precision){ while(ans*ans<=n){ ans=ans+inc; } ans=ans-inc; inc=inc/10; ...
ALGO
0.999983
3.331115
82bcb1e3-f090-4b49-8561-cb30c5e15cd5
phandaiduonghcb1/nmlt
Buoi5/E7.cpp
#include <bits/stdc++.h> int a[100][100]; using namespace std; void nhap(int a[100][100], int m, int n) { for (int i=0;i<m;i++) for (int j=0;j<n;j++) cin>>a[i][j]; } void xuat(int a[100][100], int m, int n) { for (int i=0;i<m;i++) { for (int j=0;j<n;j++) cout<<a[i][j]<<" "; ...
ALGO
0.999504
3.741282
746d3847-b9e2-4cef-b3a5-d1b050427a92
Sefayet-Alam/New-CP-submissions_vol_2
D_Ice_Cream_Balls.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; //VVI #define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define pb push_back #define ll long long #define ff first #defi...
ALGO
0.999862
4.41638
b64a5193-b9e4-4acb-a571-4065ac6d08dd
forked-llvm/Polaris-Obfuscator
clang-tools-extra/clangd/FuzzyMatch.cpp
#include "FuzzyMatch.h" #include "llvm/Support/Format.h" #include <optional> namespace clang { namespace clangd { constexpr int FuzzyMatcher::MaxPat; constexpr int FuzzyMatcher::MaxWord; static char lower(char C) { return C >= 'A' && C <= 'Z' ? C + ('a' - 'A') : C; } // A "negative infinity" score that won't overflo...
TOOL
0.923909
6.817769
d2fc0c55-be47-4f29-af23-fd1fa536d801
vivekup3424/Coding_Problems
leetcode/cpp/215.cpp
class Solution { public: int findKthLargest(vector<int>& nums, int k) { priority_queue<int, vector<int>, greater<int>> pq; for (int num : nums) { pq.push(num); if (pq.size() > k) { pq.pop(); } } return pq.top(); } }; The ...
ALGO
0.999998
6.950076
2bc90be2-5a47-4883-915b-65f9253d4640
ShawUz/ExperimentalStudy
matlab/SBM/private/calc_T_e_bra.cpp
#include <math.h> #include <matrix.h> #include <mex.h> // Prototypes // Main Function void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { // Check for errors in inputs/outputs if (nrhs != 6) mexErrMsgTxt("Incorrect number of input arguments"); //if (nlhs != 1) mexErrMsgTxt("Incorrec...
ALGO
0.999295
5.135594
d1bc4989-955a-48a6-a504-8269d9f26e61
denis-gubar/Leetcode
all/3513. Number of Unique XOR Triplets I.cpp
class Solution { public: int uniqueXorTriplets(vector<int>& nums) { int const N = nums.size(); if (N < 3) return N; int result = 2; while (result <= N) result <<= 1; return result; } };
ALGO
0.999605
5.805985
e8d065e2-2b53-4ffc-ba59-db7d7d65286f
MPSLab-ASU/ccf
llvm-project/llvm/lib/Analysis/ScalarEvolutionDivision.cpp
#include "llvm/Analysis/ScalarEvolutionDivision.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/IR/Constants.h" #include "llvm/Support/Casting.h" #include "llvm/Support/ErrorHandling.h" #include <cassert> #include ...
ALGO
0.920496
6.946086
8d97f52a-1b9d-412e-a5f8-c12b53fddfb7
betusin/darts-counter
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.998859
6.785645
f285f6a1-7986-4e7d-bde4-12c4d39c9a5a
Shreya-Joshi23/-6Companies30days
Microsoft/324.cpp
class Solution { public: void wiggleSort(vector<int>& nums) { /* nums = [1,5,1,1,6,4] [1,1,1,4,5,6] [1,6,1,5,1,4] nums = [1,3,2,2,3,1] [1,1,2,2,3,3] [2,3,1,3,1,2] */ priority_queue<int,vector<int>>pq(nums.begin(),nums.en...
ALGO
0.999974
5.42354
ac7528d9-207f-46ea-a178-1d0c632098eb
arpitghura/Cpp-Codes-Practice
Patterns/p16AlphabetPattern.cpp
#include<iostream> using namespace std; int main(){ int rows; cout<<"Enter Numer of rows :"; cin>>rows; for (int i = 0; i < rows; i++) { for (int j = 0; j <= i; j++) { char c = (65+j); cout<<c; } cout<<endl; } return 0; }
ALGO
0.983671
3.316236
de0b5140-25d2-46f1-8260-1d7e65b89759
utkarshbhatnagar34/Competitive-Programming-Subsmission
Codechef Problem/april_lunchtime(2021)/bench_press.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double lld; typedef unsigned long long ull; #define endl "\n" #define FIO \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) //const lld pi = 3.14159265358979323846; //#define mod 100...
ALGO
0.99992
4.326231
86a16316-b68d-4f97-8e26-a65ac6bff621
buiquochuy2508/DSA_CODE_PTIT
DSA03002-NHAMCHUSO.cpp
#include <bits/stdc++.h> using namespace std; int main(){ string a,b; cin >> a >> b; for (int i=0; i<a.size(); i++){ if (a[i]=='6') a[i]='5'; } for (int i=0; i<b.size(); i++){ if (b[i]=='6') b[i]='5'; } cout << stoll(a)+stoll(b) << " "; for (int i=0; i<a.size(); i++){ if (a[i]=='5') a[i]='6'; } for (int...
ALGO
0.999806
4.485224
1f7e4c1f-4ee3-41d1-99ab-fad4cfeddc50
gosujuna/cf
round 850/b.cpp
#include <bits/stdc++.h> using namespace std; const int inf = 100000000; int main() { int tt; cin >> tt; while (tt--) { int n, w, h; cin >> n >> w >> h; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } vector<int> b(n); for (int i = 0; i < n; i++) { cin >> b[i]; } int minshi...
ALGO
0.999813
3.713426
ace51973-5ef3-4f98-b334-eee1c9b4024a
ondryaso/leoAtFit2
0ZS/GAL/Projekt/OGDF/test/src/graphalg/lca.cpp
#include <sstream> #include <ogdf/basic/Graph.h> #include <ogdf/tree/LCA.h> #include <ogdf/basic/graph_generators.h> #include <graphs.h> #include <testing.h> static void trivial() { it("constructs LCA data structure on an empty graph", [] { Graph G; LCA lca(G); }); it("answers level query on an arborescence wi...
TEST
0.863349
7.704853
3959ed09-931f-45d7-969d-55c348ef9eb6
ishandutta2007/codeforces
ainta/normal/533/A.cpp
#include<cstdio> #include<algorithm> #include<vector> #include<queue> #define N_ 1001000 #define SZ 1048576 #define pii pair<int,int> using namespace std; int n, w[N_], P[N_], H[N_]; int H1[N_], H2[N_], Num[N_]; int res = 2e9; vector<int>E[N_], G[N_], Ch[N_]; void DFS(int a, int pp, int h1, int h2) { if (w[h1] >= w[a]...
ALGO
0.99978
3.660459
19dda469-640a-41d0-909a-677ce0d8cdf2
atharval1/c_plus_plus_programs_course
linkedlist/insertafter_linkedlist.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; class Node{ public: int data; Node *next; }; void printlist(Node* n){ while (n != NULL) { cout<<n->data<<" "; n=n->next; } } void insertsafter(Node* prev_node,int new_data){ if(prev_node == NULL...
ALGO
0.997929
4.020055
1719d31e-e2f5-48fe-a2d9-d95b167b96eb
Mozarek/WDI
cwiczenia 02/cw02zad02.cpp
#include <iostream> int main() { int podana; bool ans = false; std::cin >> podana; int n=1; int wartosc = n*n + n + 1; int wielokrot = wartosc; for(int n=1; wartosc <= podana; n++) { while(wielokrot < podana) wielokrot+=wartosc; if(wielokrot == podana) ...
ALGO
0.99867
4.045318
492ee8b1-8e46-42d0-9b66-7b8e0aa95b20
AustinD1024/AERSP424_HW1
Just cpp Files/HW1_Question1.cpp
// HW1_Question1.cpp : This file contains the 'main' function. Program execution begins and ends there. #include <iostream> #include <array> #include <numeric> #include <iomanip> int main() { //AirplaneEW double AirplaneEW; std::cout << "Enter the Airplane empty weight (pounds): "; std::cin >> AirplaneEW; std::c...
ALGO
0.993991
4.080199
c1810728-6ef0-4f99-8db8-79d2b4db4c64
theoden42/code-store
codeforces/2024-2025 ICPC, NERC, Southern and Volga Russian Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams)/A.cpp
/* author: (g)theoden42 */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define all(a) a.begin(), a.end() #ifdef ON_PC #include <debug.h> #else #define debug(x...) #endif template<typename T> using o...
ALGO
0.999989
3.227022
c2b9d378-68d3-48ec-b44d-ec080fec6be9
zyavuz610/learn-cpp
_2024/04.2/pointers4-call-by-pointer.cpp
#include <iostream> using namespace std; void takas1(float f1,float f2){ float temp = f1; f1 = f2; f2 = f1; } void takas2(float *f1,float *f2){ float temp = *f1; *f1 = *f2; *f2 = temp; } int main(){ float f1 = 15.0,f2=20.0; cout<<"Takas Oncesi:"<<f1<<","<<f2<<endl; // takas1(f1,...
ALGO
0.999472
3.636061
0dffe3e1-e588-4c47-802a-eb7812f96cdb
koicy-ly/koicy-ly.github.io
assets/code/P5350.cpp
#include <iostream> #include <set> #include <vector> using namespace std; struct node { int l, r; mutable int val; inline bool operator < (const node& comp) const { return l < comp.l; } }; set<node> s; inline void out() { for (node i : s) for (int j = i.l; j <= i.r; j++) printf("%d ", i.val)...
ALGO
0.999834
4.987388
aa69f11a-2cca-41e8-891e-ed0de47dc9e2
rbksh/cp-files
conditional_switch.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; switch (n) { case 1: cout << "one" << endl; case 2: cout << "two" << endl; case 3: cout << "three" << endl; case 4: cout << "four" << endl; case 5: cout << "five" << endl; case 6: cout << "six" << endl; case...
ALGO
0.993209
3.876042
b0cda0b8-b17a-48d7-ae04-6cd5aec1a608
VipulChauhan89/Leetcode-solutions
Array/2460-Apply_Operations_to_an_Array.cpp
class Solution { public: vector<int> applyOperations(vector<int> &nums) { int n=nums.size(); vector<int> ans(n,0); int j=0; for(int i=0;i<n-1;i++) { if(nums[i]==nums[i+1]) { nums[i]*=2; nums[i+1]=0; } ...
ALGO
0.999976
5.329671
69037a74-897f-4eb3-a8e1-6b88dd2890ca
mishra-ji20/Leetcode
149-max-points-on-a-line/149-max-points-on-a-line.cpp
class Solution { public: int maxPoints(vector<vector<int>>& points) { if(points.size()<=2) return points.size(); // only two points are always on the same line, beacuse using 2 points // line is made int res = 0; for(int i = 0; i < points....
ALGO
0.999959
5.448174
b19b004d-c953-4b7c-bba6-7dbc246fbdd1
Aldarov/DE_Sprint
src/tasks_1_7/task_01.cpp
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, ""); double num1, num2; cout << "Введите 1 число: "; cin >> num1; cout << "Введите 2 число: "; cin >> num2; if (num1 > num2) { cout << num1 << " больше " << num2; } else if (num2 > num1) { ...
ALGO
0.998238
3.590702
105f0e29-feb3-41cc-92b2-eb4bd5d35ad0
prakhar-161/DSA-prep
Searching and Sorting/Sorting Algorithms/05-quick_sort.cpp
#include <bits/stdc++.h> using namespace std; int partitionIndex(vector<int> &arr, int low, int high) { int pivot = arr[low]; int i = low, j = high; while(i < j) { while(arr[i] <= pivot && i <= high - 1) { i++; } while(arr[j] > pivot && j >= low + 1) { j++; ...
ALGO
0.999831
5.227538
8d2e32f1-1560-4ce2-94fe-e241181d0e3c
br0hit/Prep
Grind/median2Dsortedarray.cpp
class Solution { public: int findcount(vector<vector<int>> &matrix, int row, int C, int val) { // cout<<"Finding cout of "<<val<<" In row "; int lo = 0; int hi = C - 1; int ans = -1; while (lo <= hi) { int mid = lo + (hi - lo) / 2; if (ma...
ALGO
0.999982
5.262228
eee1cbbd-2bc3-453f-b3c2-37d91be615d2
SidhuDilbagh/Leetcoding
my-folder/0238-product-of-array-except-self/solution.cpp
class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { int n=nums.size(); vector<int> answer(n,1); int left=nums[0],right=nums[n-1]; for(int i=1;i<n;i++){ answer[i]*=left; left*=nums[i]; answer[n-i-1]*=right; right*...
ALGO
0.999991
6.174106
8864b27b-831c-4349-a190-0cba32dfc483
RoadsUntravelled/codes
my_codes/指针函数.cpp
/************************************************************************* > File Name: 二维指针数组.cpp > Author: 魍魉楼主 > Mail: <EMAIL> > Created Time: 2018年01月11日 星期四 19时03分22秒 ************************************************************************/ #include<iostream> using namespace std; int *array(int a,int b){ ...
ALGO
0.994003
3.45286
934ca596-6adb-47d9-942d-f0d744fdb7c5
ishandutta2007/codeforces
mohamedabookail/normal/1668/B.cpp
/** * author: Mohamed Abo Okail * created: 19/O4/2O22 **/ #include <bits/stdc++.h> using namespace std; #define ll long long #define all(x) x.begin(),x.end() #define sz(x) int(x.size()) #define endl "\n"; int main() { std::ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while(...
ALGO
0.999861
5.117698
0fc830a0-68d5-4507-b9d6-1fce9aeb10a1
eczajewska/cpp
fibonacci_sequence.cpp
#include <iostream> #include <windows.h> using namespace std; int main() { int a,i; int fib[100000]; cout << "Ile wyrazow ciagu Fibonacciego wyznaczyc?" << endl; cin>>a; cout<<"************************************"<<endl<<a; if (a>=5) cout<<" wyrazow ciagu Fibonacciego: "; else if...
ALGO
0.999032
3.326669
85b24ea6-d7e8-4729-b185-02d393fe77b3
asvikr/SPOJ_SOL
NDIV/13479186.cpp
#include<bits/stdc++.h> using namespace std; int prime[32000]; int chk[32000]; int cnt=1; void sieve() { for(int i=3;i<=180;i+=2) { if(!chk[i]) { for(int j=i*i;j<=32000;j+=i) chk[j]=1; } } prime[0] = 2; int j=1; for(int i=3;i<=32000;i+=2) {...
ALGO
0.999964
4.448963
32cf10a6-a0ed-4b60-a52e-cdbb956bf793
songjihu/UnrealEngine-5.0.3-release
Engine/Source/Runtime/SignalProcessing/Private/Filter.cpp
#include "DSP/Filter.h" #include "DSP/Dsp.h" namespace Audio { float FBiquadFilter::ClampCutoffFrequency(float InCutoffFrequency) { return FMath::Clamp(InCutoffFrequency, 5.0f, SampleRate / 2.0f - 1.0f); } FBiquadFilter::FBiquadFilter() : FilterType(EBiquadFilter::Lowpass) , Biquad(nullpt...
TOOL
0.987494
5.757691
5e533ec5-7d7d-4565-808d-392db06df723
Rakesh-46-VR/Data-Structures
Lecture27/sizearr.cpp
#include <iostream> using namespace std; int main() { int arr[5] = {11,21,31,20,19}; int *p = 0; p = arr; cout << sizeof(arr) << endl; cout << sizeof(p) << endl; cout << arr << endl; cout << &arr << endl; cout << &arr[0] << endl; cout << 3[p] << endl; return 0; }
TOOL
0.883146
3.560009
bf990526-ce3f-4d0a-b75c-7ea8f4a3bbff
Yuki-Wada/competitive_programming
cpp/src/at_coder/agc043_b.cpp
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <complex> #include <sstream> #include <io...
ALGO
0.99999
3.59879
92f2521a-2c99-4186-b943-3d5fbdfa70e9
Zookim/algorithm
Programers/HIndex.cpp
#include <string> #include <vector> #include <map> #include <iostream> using namespace std; int solution(vector<int> citations) { int answer = 0; map<int, int, greater<int>> m; for (int i = 0; i < citations.size(); i++) { if (m.find(citations[i]) != m.end()) { m[citations[i]]++; ...
ALGO
0.999964
5.844695
913d5863-63fd-4965-8f1b-f065b892bc14
NumanAnees/Leetcode-Solution
Linked List/Basic-Circular linked list/index.cpp
#include<iostream> #include<map> using namespace std; class Node { public: int data; Node* next; //constrcutor Node(int d) { this->data = d; this->next = NULL; } ~Node() { int value = this->data; if(this->next != NULL) { delete next; ...
ALGO
0.999864
5.144036
1f1b17be-89fd-49b9-a5fa-b173e0932fb9
MOHIT-IITP/Leetcode
1572.cpp
#include<bits/stdc++.h> using namespace std; int diagonalSum(vector<vector<int>> & matrix){ int sum =0; for(int i=0;i<matrix.size();i++){ sum+=matrix[i][i]; // check the middle element, which should go only one time if(i!=n-i-1){ sum+=matrix[i][n-i-1] } } return sum; } int main() { re...
ALGO
0.99988
3.882823
85306d79-2d56-4ea4-aafc-315dd7f050de
LSH3333/PS
baekjoon/12886.cpp
#include <iostream> #include <algorithm> using namespace std; bool visited[5000][5000]; void dfs(int A, int B, int C) { if(A == B && B == C) { cout << 1; exit(0); } if(A != B) { int X = min(A,B); int Y = max(A,B); if (!visited[X][Y] && !visited[Y][X]) { ...
ALGO
0.999975
4.551007
fd91063a-129d-49d5-8280-414a0755351d
thegamer1907/Code_Analysis
CodesNew/194.cpp
#include<bits/stdc++.h> using namespace std; int N, M, A[100005]; int main() { scanf("%d %d", &N, &M); for(int i=0;i<N;i++){ scanf("%d", &A[i]); } int p1 = 0, p2 = 0, sum = 0, ans = 0; while(p2 < N){ if (sum+A[p2] <= M) { sum += A[p2++]; } else { if (ans < (p2 - p1)) ans = p2 - p1; sum...
ALGO
0.999995
3.769706
d4ba0e39-bd1a-47a3-b630-2c51586e83bf
Thalisson-Alves/Competitive-Programming
submissions/UVA/10055.cpp
#include <bits/stdc++.h> using namespace std; int main(int qtd, char* nome[]) { ios::sync_with_stdio(false); cin.tie(0); long long a, b; while(cin >> a){ cin >> b; cout << abs(a-b) << endl; } return 0; }
ALGO
0.999444
3.581733
9cd91943-08df-434b-9d3a-b613701c45c3
aroqque/Lab_Works
kursovaya/ugadai_chislo/MyForm.cpp
#include "MyForm.h" #include <time.h> #include <iostream> using namespace System; using namespace System::Windows::Forms; int number, count = 0; int min = 0, max = 51; #define limit 7 // void main() { srand(time(NULL)); Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefaul...
TOOL
0.954391
4.201624
37668984-6def-4d56-bec0-a8c07ea344b4
vedmandal/array
decodeXoredArray.cpp
#include<iostream> #include<vector> using namespace std; vector<int> decode(vector<int>& encoded, int first) { vector<int> ans(encoded.size() + 1); ans[0] = first; for (int i = 0; i < encoded.size(); ++i) ans[i + 1] = ans[i] ^ encoded[i]; return ans; } int main(){ }
ALGO
0.99995
3.267713
ae5d6b63-6e26-47e8-90c2-bd9fa029e076
zcking/HackerRank
Domains/DataStructures/Trees/height.cpp
/*The tree node has data, left child and right child struct node { int data; node* left; node* right; }; */ int height(node* root) { if(root == NULL ) return -1; return max(height(root->left), height(root->right)) + 1; }
ALGO
0.999716
3.564949
a09bab28-49f9-4fd5-912e-1a00401fa46c
SarvT/codetra
cpp2745.cpp
class Solution { public: int longestString(int x, int y, int z) { if(x<y) y = x+1; else if(x>y) x=y+1; return 2*(x + y + z); } };
ALGO
0.998038
4.865903
a04bed9c-3b75-42a2-8559-c7f8d96ad76a
mmozeiko/Squares3D-Android
jni/newton/coreLibrary_200/source/core/dgSmallDeterminant.cpp
#include "dgStdafx.h" #include "dgGoogol.h" #include "dgSmallDeterminant.h" #define Absolute(a) ((a) >= 0.0 ? (a) : -(a)) dgFloat64 Determinant2x2 (const dgFloat64 matrix[2][2], dgFloat64* const error) { dgFloat64 a00xa11 = matrix[0][0] * matrix[1][1]; dgFloat64 a01xa10 = matrix[0][1] * matrix[1][0]; *error = Abs...
ALGO
0.999976
5.235818
e5665d10-8470-44b2-a626-2ec33cf7af0a
HuangErGou/Dragonball
boost_1_68_0/doc/html/boost_asio/example/cpp11/spawn/parallel_grep.cpp
#include <boost/asio/dispatch.hpp> #include <boost/asio/post.hpp> #include <boost/asio/spawn.hpp> #include <boost/asio/strand.hpp> #include <boost/asio/thread_pool.hpp> #include <fstream> #include <iostream> #include <string> using boost::asio::dispatch; using boost::asio::spawn; using boost::asio::strand; using boost...
TOOL
0.892434
6.625267
c3991648-ea6e-47fc-b115-3a21e46532b2
SoleMin/Algorithmic_Problems
110907/8.cpp
#include <iostream> #include <queue> #include <unordered_map> #include <vector> using namespace std; // class Node { // public: // string destinationCity; // int departureTime; // int durationTime; // public: // Node(string destinationCity, int departureTime, int durationTime) // : destination...
ALGO
0.998901
5.473026
c75a1a1b-7e65-4f85-b9da-0a3f0451fc5d
ishandutta2007/codeforces
burunduk1/normal/338/B.cpp
/** * Author: Sergey Kopeliovich (<EMAIL>) * Date: 2013.08.16 */ #include <cstdio> #include <vector> #include <algorithm> #include <set> using namespace std; #define forn(i, n) for (int i = 0; i < (int)(n); i++) #define pb push_back #define sz(a) (int)(a).size() typedef vector <int> vi; const int inf = (int)1e9...
ALGO
0.999909
4.528858
e5364994-9d4f-4c76-b19a-05f3bf773efe
amanullah7649/Programming
Devskill_Intermediate/DevCP - Beginner - DFS+BFS/Ordering Tasks.cpp
#include<bits/stdc++.h> #define pb push_back #define pf printf #define sf scanf #define sn(a) scanf("%lld",&a) #define snn(a,b) scanf("%lld %lld",&a,&b) #define snnn(a,b,c) scanf("%lld %lld %lld",&a,&b,&c) #define ll long long #define fio ios_base::sync_with_stdio(false),ci...
ALGO
0.999969
4.302853
fb3d1d21-f1a2-4317-8913-8cc195724d90
kyw04004/ProblemSolving
BOJ/6497_전력난.cpp
#include<stdio.h> #include<iostream> #include<cstring> #include<string> #include<functional> #include<queue> #include<vector> using namespace std; priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq; vector<vector<pair<int, int>>> v; long long V, E, a, b, c, t, sum, cnt, M; int chk[200001...
ALGO
0.999927
4.081817
6f1efe28-2b13-4465-bc07-8ae2252312de
Nikkss123/cpp-20-marks
class_product.cpp
//class product #include <iostream.h> #include <conio.h> #include <iomanip> // For manipulators like setw, setprecision #include <string.h> class Product { protected: int Product_Id; char Product_Name[50]; float Price; public: // Constructor Product(int id = 0, const char* name = "", float price =...
TOOL
0.937289
5.425601
71e5cb2d-2c84-46f9-8400-1f0db57f0f53
takoyaki9n/contest
atcoder/abc064/A.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include ...
ALGO
0.999674
3.74257
0684311b-92c0-49fa-9ef3-a0230537de4f
Nikzr0/Algorithms
CPlusPlus/Range/Range.cpp
#include <iostream> #include <vector> #include <locale> #include <algorithm> using namespace std; int main() { setlocale(LC_ALL, "en_US.UTF-8"); int n; cin >> n; vector<int> nums(n); for (int i = 0; i < n; i++) cin >> nums[i]; sort(nums.begin(), nums.end()); int m; cin >> m; int a, b; int counter = 0; f...
ALGO
0.999988
5.101675
0fa937f6-7f41-495a-b13d-590bd415fbac
FennelDumplings/leetcode-maxed_out
algorithm/cpp/prob1001-1500/prob1286_medium_Iterator-for-Combination.cpp
// prob1286: Iterator for Combination /* * Design an Iterator class, which has: * A constructor that takes a string characters of sorted distinct lowercase English letters and a number combinationLength as arguments. * A function next() that returns the next combination of length combinationLength in lexicographica...
ALGO
0.99988
6.528909
3bd9dd30-ce3f-4665-8c39-23b906993e52
raincross7/code-similarity
codes/train_code/problem438/problem438_13.cpp
#include <iostream> #include <string> #include <vector> #include <set> #include <stack> #include <queue> #include <map> #include <algorithm> #include <iomanip> #include <math.h> #include <string.h> #include <cstdio> #include <tuple> using namespace std; using ll = long long; using ld = long double; using pll = pair<ll...
ALGO
0.999824
3.470703
ce07c13d-2162-4361-be87-139c9ac830a2
shifou/leetcode
Single Number.cpp
class Solution { public: int singleNumber(int A[], int n) { int res = 0; for(int i=0; i <n ;i++) { res^= A[i]; } return res; } };
ALGO
0.99978
5.24683
e3e4082e-e21a-461a-9b0e-42c11ce37ac7
thientoan0101/CodeForce
Codeforce/673A_BearAndGame.cpp
#include <iostream> #include <vector> #include <string> using namespace std; int main() { int n, start = 0; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } a.push_back(90); for (int i = 0; i <= n; i++) { int d = a[i] - start; if (d > 15) { cout << start + 15; return 0; } ...
ALGO
0.999695
3.5697
048cd830-ee3a-4e35-ad7f-a6a60ac83fd9
ishandutta2007/codeforces
alternatingcurrent/normal/1494/C.cpp
#include<bits/stdc++.h> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; int qmax(int a, int b){ return (a > b) ? a : b; } int T; int n, m; vector<int> b[2], p[2]; int ans = 0; int cnt_match = 0; void solve(int now){ cnt_match = 0; rep(i, (int)p[now].size()) if(lower_bound(b[now].begin(), b[now].e...
ALGO
0.999937
3.973341
07a357a9-287a-4eac-a4dd-bac16acc1644
Shrutikatyal/Interview-Preparation
Arrays & Strings/GFG Amazon/Smallest subarray with sum greater than x.cpp
/* * Author : Shruti Katyal * Date : 18 May, 2020 * * Compiler : g++ 5.1.0 * Flags : -std=c++14 * */ #include <iostream> using namespace std; int findMinLength(int arr[], int n, int elt){ int minLength = n + 1, sum = 0; int start = 0, end = 0; while(end < n){ w...
ALGO
0.999703
5.20471
ada12346-1100-412c-9923-5a390f61e23d
MathProgrammer/CodeForces
2020/Practice/Programs/Pashmak and Graph.cpp
#include <cstdio> #include <vector> #include <algorithm> #define all(v) (v).begin() + 1, (v).end() using namespace std; struct Edge { int source, destination, weight; int operator <(const Edge &A) { return (weight < A.weight); } }; int main() { int no_of_vertices, no_of_edges; scanf(...
ALGO
0.999842
4.441526
49b3611f-939a-485b-a31d-7b1b12e376aa
yashasvi128/Data-Structures_Experiemnts
Expt8.cpp
/*Write a program to accept N numbers in an array, and then sort the array using Insertion Sort. Then accept a number from the user and insert it in the array according to the sequential order.*/ #include <iostream> using namespace std; class sort1 { int a[20]; int n; public: sort1() { cout<<...
ALGO
0.999919
4.895776
5d067e88-0c33-4ce5-9d9d-eaba80c87a1c
Natithan/p1_causality
buatest/detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp
using namespace pybind11::literals; namespace detectron2 { namespace COCOeval { // Sort detections from highest score to lowest, such that // detection_instances[detection_sorted_indices[t]] >= // detection_instances[detection_sorted_indices[t+1]]. Use stable_sort to match // original COCO API void SortInstancesByD...
DATA
0.995816
7.859746
e266d513-fbec-4c73-8109-24f55f027c54
ing181/NA3TE3BPRRPRR01_github
Lösningar till EXTRA UPPGIFTER I C++ PROGRAMMERING-A/uppg11/main.cpp
/* Skriv programmet fakultet som fungerar enligt fljande: Programmet ger n! d.v.s 1*2*3....*n Ange vrde fr n programmet avslutas om 0 anges som varde =>4 4! = 24 */ #include <iostream> #include <string> using namespace std; int main() { setlocale(LC_ALL, "swedish"); int n; long long produkt = 1; // OBS! Inte 0, d ...
ALGO
0.99974
4.127212
f1c0e688-60bd-4239-a08f-3cfceb74244c
phamxuan20/LTCBbuoi3_MinhXuan
hàm/min4so.cpp
#include <iostream> #include <math.h> using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; static void Main() { Console.WriteLine("Nhap a: "); int a = Convert.ToInt32(Console.ReadLine()); Console.WriteL...
ALGO
0.999724
3.697033
7613eea7-78ac-4d5c-88cd-1c549194efc3
Leapense/problems
32746번: String Split/solution.cpp
#include <bits/stdc++.h> using namespace std; bool canTransform(const string &s, const string &t) { size_t n = s.size(), m = t.size(); if (m > n) return false; if (m == 1) return s.find(t[0]) != string::npos; for (int k = 0; (1u << k) <= n; ++k) { size_t step = 1u << k; ...
ALGO
0.999991
5.990897
a87614a1-6fd4-4d85-8955-a6d0fa2f4d4b
Claudiomancinelli90/CutLocus
libs/libigl/include/igl/cross.cpp
// http://www.antisphere.com/Wiki/tools:anttweakbar IGL_INLINE void igl::cross( const double *a, const double *b, double *out) { out[0] = a[1]*b[2]-a[2]*b[1]; out[1] = a[2]*b[0]-a[0]*b[2]; out[2] = a[0]*b[1]-a[1]*b[0]; } template < typename DerivedA, typename DerivedB, typename DerivedC> IGL_INLINE ...
ALGO
0.993391
6.153929
1cf591cf-3444-4ea6-b6e5-dbf1179d4803
msa-iqbal/c-plus-plus-code-solutions
31.0 (C++) A Simple example for Abstract.cpp
/// Simple example for Abstract #include <iostream> using namespace std; class A // Super_Class { public: // 'void' or user-defined func() can be use void show(){ cout<<" Hello Today! \n"; } virtual void display() = 0; // Use for create a 'Abstract class' }; // 'B' Sub_Class inherit 'A'...
TOOL
0.865202
5.279355
0f482d40-e47f-4b87-b3c9-fd2bb7eae00f
PhillipDiCarlo/The-Corruptor
ASRC Systems Simulation Driver/boost_1_74_0/libs/sort/benchmark/parallel/benchmark_strings.cpp
//---------------------------------------------------------------------------- /// @file benchmark_strings.cpp /// @brief Benchmark of several sort methods with strings /// /// @author Copyright (c) 2017 Francisco José Tapia (<EMAIL> )\n /// Distributed under the Boost Software License, Version 1.0.\n /// ...
TEST
0.994796
6.415236
532e36b6-efec-4246-9497-ce2b6c0842b4
Oooobscure/template
Graph/minimum-arborescence.cpp
//Problem : 4966 ( GGS-DDU ) Judge Status : Accepted //RunId : 11507235 Language : G++ Author : Ample //Code Render Status : Rendered By HDOJ G++ Code Render Version 0.01 Beta #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<vector> #include<algorithm> #include<assert.h> using ...
ALGO
0.999825
3.766725
ebe81efd-a7b9-4b63-8b2a-03757952bdf2
lcpachecoo/beecrowd
judge/1182.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { int C; char SouM; float resultado=0,mat[12][12]; cin>>C; cin>>SouM; for(int i=0; i<12;i++){ for(int j=0;j<12;j++){ cin>>mat[i][j]; if(j==C){ resultado+=mat[i][j]; ...
ALGO
0.995269
3.634373
f37b9b3f-a522-42a0-b6d2-0d92d894bfd3
BinomialSheep/CompetitiveCpp
AtcoderProblems/BootCampEasy/092_Unification.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; // #include <atcoder/all> // g++ --std=c++14 -I "/mnt/c/Program Files (x86)/Microsoft Visual // Studio/2019/Community/VC/Tools/MSVC/14.29.30037/include" code.cpp #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define MAX 10000 #define INFTY (1 <<...
ALGO
0.999806
4.944138
014db4b8-d635-4d90-8a58-a885b3927d8f
CAPDGroup/CAPD
capdExt/filibsrc/examples/example_template.cpp
// example usage of the template library #include <interval/interval.hpp> #include <vector> #include <iostream> using filib::interval; /* Evaluation of a Polynomial */ /* using Horner's rule */ interval<double> horner ( /* interval coefficients in STL container vector*/ std::vector< interval<double> > const & v,...
ALGO
0.993731
5.980514
e5a90703-4728-4523-8281-add55ee46992
TJD2004/Coding-in-CPP
DSA/Queue/CircularTour_Queue.cpp
#include<iostream> #include<queue> using namespace std; struct petrolpump { int petrol; int distance; }; class Solution { public: int tour(petrolpump p[], int n) { int deficit = 0; int balance = 0; int start = 0; for(int i = 0; i < n; i++) ...
ALGO
0.999862
5.470932
22f14fcb-4ade-4664-bb8b-dd8f131565e0
ishandutta2007/codeforces
pikel_rik/normal/1334/F.cpp
#include <bits/stdc++.h> using namespace std; template<typename T, typename L = T> struct segment_tree { using F = std::function<T(const T&, const T&)>; int n; std::vector<T> t; std::vector<L> lazy; T e; F f; segment_tree() : n(), e(), f() { } template<typename U> segment_tree(const std::vector<U> &v, int ...
ALGO
0.999995
4.263037
1e4a329a-a3ab-4f92-8849-a44c470783ea
ishandutta2007/codeforces
mateocv/normal/1389/A.cpp
#include <bits/stdc++.h> #define pb push_back #define fst first #define snd second #define fore(i,a,b) for(int i=a,ggdem=b;i<ggdem;++i) #define SZ(x) ((int)x.size()) #define ALL(x) x.begin(),x.end() #define mset(a,v) memset((a),(v),sizeof(a)) #define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0) using namespace st...
ALGO
0.999914
4.305793
c1354716-bafb-4609-913a-9551474e3ee0
ishandutta2007/codeforces
kingponyhead/normal/1369/B.cpp
// Screw this .. #include<bits/stdc++.h> using namespace std; int main() { int q; cin >> q; for (; q; q --) { int n; string S; cin >> n >> S; int df = 0; for (int i = 0; i < n; i ++) if (S[i] != S[i - 1]) df = 1; if (!df) ...
ALGO
0.999998
3.658898