uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
13855115-0383-4518-83dd-cb22ddba9f61
SourovCodes/c-programming
codeforces/385-A.cpp
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, c; cin >> n >> c; int arr[n]; int maxProfit = 0; for (int i = 0; i < n; i++) { cin >> arr[i]; if (i > 0) { int profi...
ALGO
0.999907
3.376911
7865f0fa-e592-48c4-802b-196d3593b2ca
jithu124/Random-Algorithms
Linked list/Reverse a linked list .cpp
/* Reverse a linked list Given a linked list of N nodes,reverse this list. The last node must be the head after the operation. */ #include<iostream> typedef struct Node Node; struct Node { int data; Node* next; Node(int x){ data = x; next = NULL; } }; int main() { retu...
ALGO
0.999594
5.124559
ccecbd9a-bf6b-4aba-8817-fe7743012319
arturremizov/Leetcode
1813.Sentence-Similarity-III.cpp
#include <iostream> #include <string> #include <vector> #include <sstream> using namespace std; class Solution { public: bool areSentencesSimilar(string sentence1, string sentence2) { vector<string> s1 = splitString(sentence1); vector<string> s2 = splitString(sentence2); if (s1.size() > s...
ALGO
0.999835
5.776988
440e5d0e-de5d-4c68-bbc2-710bbf1109a9
Saravjeet0806/DSAcourseLectureCodes
trees/1_binary_tree_implementation/binaryTreeimplementation.cpp
#include <iostream> #include <queue> using namespace std; class node { public: int data; node *left; node *right; node(int d) { this->data = d; this->left = NULL; this->right = NULL; } }; node *buildTree(node *root) { cout << "Enter the data" << endl; int data;...
ALGO
0.999853
4.375213
08aadd3e-3d9a-4e09-bf82-60651b9055fa
shubs99/Cpp-Tutorials
Basic Maths/tempCodeRunnerFile.cpp
#include<bits/stdc++.h> // using namespace std; // int count_digits(int n){ // int digits = floor(log10(n) + 1); // return digits; // } // int main(){ // int n; // cin>>n; // cout << "The no of digits in " << n << " is " << count_digits(n) << endl; // return 0; // }
ALGO
0.998879
5.302286
840a079b-b09a-4a57-8c58-11cbef92192d
raincross7/code-similarity
codes/train_code/problem339/problem339_44.cpp
#include <bits/stdc++.h> #define __STDC_FORMAT_MACROS #define p64 PRId64 #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR (i, 0, n) #define ALL(f, x, ...) \ ([&] (decltype ((x)) ALL) { ...
ALGO
0.989593
3.913008
bc783f70-98e2-4be6-9af8-266d62bb45ff
sahildando/CP-Tourist
Difficulty: Medium/Count Inversions/count-inversions.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to merge and count inversions int mergeAndCount(vector<int>& arr, vector<int>& temp, int left, int mid, int right) { int i = left; // Starting index for left subarray ...
ALGO
0.999296
6.632774
9a090c0b-ec46-4d66-b871-ceed41493a0a
KangwooChoi/LeetCode
2044-count-number-of-maximum-bitwise-or-subsets/2044-count-number-of-maximum-bitwise-or-subsets.cpp
class Solution { public: int ans = 0; int countMaxOrSubsets(vector<int>& nums) { int target = 0; for (int num : nums) { target |= num; } int curr = 0; cout << target << endl; backtrack(target, nums, 0, curr); return ans; } void ba...
ALGO
0.999981
5.789801
645dc63b-be36-46ca-9614-fa17fa584355
buttburger/VertexBufferObjects
OpenGL24/OpenGL24/objloader.cpp
#define _CRT_SECURE_NO_WARNINGS #include <vector> #include <stdio.h> #include <string> #include <cstring> #include <glm/glm.hpp> #include "objloader.h" // Very, VERY simple OBJ loader. // Here is a short list of features a real function would provide : // - Binary files. Reading a model should be just a few memcpy...
TOOL
0.941163
4.245369
adbef31e-670e-4d5a-a6ab-14e9f70084b5
Palak-Bhandari/College
1. PL/PL_A8_3.cpp
#include<iostream> using namespace std; #define SIZE 5 class customer{ public: int bid; string name; }; class Cqueue{ customer c[SIZE]; int f,r; public: Cqueue(){ f = -1; r = -1; } bool is_empty(){ if(f==-1 && r==-1) return true; else return false; } bool is_full(){ if((r+1)%SI...
ALGO
0.954645
4.054693
2116ee7d-2b9d-4937-aee7-067d1efe67cf
AbedMohsen1/projecxIntern
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.998733
6.76775
366a7ae0-7013-49d5-b18d-627a73a0ff12
felipe-kallas/contests
2015_codecraft/f.cpp
#include <bits/stdc++.h> using namespace std; const long long MOD = 1e9 + 7; const int MAXN = 2123; struct Point { int x, y; Point() {} Point (int a, int b) { x = a; y = b; } bool operator< (const Point p) const { if (x != p.x) return x < p.x; return y < p.y; } }; void Add (long long & a, long long b) {...
ALGO
0.99986
4.553611
88304abb-4304-4cd3-93cf-13c0b5a52495
Aishwarya7902/DAILY-LEETCODE-CHALLENGE
2023/APRIL/26th April__258. Add Digits Easy.cpp
PROBLEM:https://leetcode.com/problems/add-digits/description/ VIDEO: BLOG: /* BRUTE FORCE : TC: SC: */ class Solution { public: //helper function int findSum(int x){ int sum=0; while(x){ int rem=x%10; sum+=rem; x/=10; } return sum; } ...
ALGO
0.999951
6.673891
debae047-4666-4525-be84-6e598ceff4ab
Min-03/Algorithm
08/W2/2023_08_09/test.cpp
#include <bits/stdc++.h> #define FastIO ios_base :: sync_with_stdio(false); cin.tie(0); cout.tie(0); using namespace std; void printFunc(int (&arr)[3][2]) { for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { cout << arr[i][j] << " \n"[j == 1]; } } } int main() { FastIO...
ALGO
0.996529
3.422755
a604935b-beed-48b0-8ee1-46704e0714dc
kowalks/competitive-programming
codeforces/edu#148/E.cpp
#include <bits/stdc++.h> #define int long long #define MOD 998244353 using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; int32_t main () { int n, a, x, y, m, k; cin >> n >> a >> x >> y >> m >> k; vector<vi> b(k+1LL, vi(n+1LL)); b[1][1]...
ALGO
0.999878
4.429764
a015dca5-a321-4352-89e5-4dba9e7d0b8b
chawinkn/competitive-programming
OTOG/997.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int p[100009]; vector<pair<int,int>> g[100009]; bool visited[100009], a[100009][69]; int find(int u) { if (u == p[u]) return u; return p[u]=find(p[u]); } void dfs(int u) { if (visited[u]) return; visited[u] = true; for (auto [v,w] : g[u]) { d...
ALGO
0.999834
4.478312
398a9792-0e69-4d40-b71b-0edf56c2db7a
arash-ha/Cpp
Remove K Digits.cpp
/* Remove K Digits Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: The length of num is less than 10002 and will be = k. The given num does not contain any leading zero. Example 1: Input: num = "1432219", k = 3 Output: ...
ALGO
0.999945
7.188679
5c2cbced-2cad-4076-ac82-847f5df0cf59
SudheerReddy9/login_page
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.9988
6.76073
8889a4e2-0edc-478e-8c74-53ec963c06a5
gajender17/Data-Structures
Question1.cpp
#include<iostream> using namespace std; int vertArr[20][20]; //the adjacency matrix initially 0 int count = 0; void displayMatrix(int v) { int i, j; for(i = 0; i < v; i++) { for(j = 0; j < v; j++) { cout << vertArr[i][j] << " "; } cout << endl; } } void add_edge(int u, int v) { //f...
ALGO
0.996712
3.773597
2c49a85c-0810-4054-834f-a58952cec17a
alexandraback/datacollection
solutions_5631989306621952_0/C++/victorsenam/A.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long long int ull; typedef long long int ll; #ifndef ONLINE_JUDGE #define DEBUG(...) {fprintf(stderr, __VA_ARGS__);} #else #define DEBUG(...) {} #endif const int N = 1007; int t; char str[N]; deque<char> dq; int main () { scanf("%d", &t); for (...
ALGO
0.999714
4.45747
42b19848-237d-4075-9f6a-72e9546928d5
sagarmanna/DESI-QNA-DEV-LEARNING
Compare the triplet.cpp
vector<int> compareTriplets(vector<int> a, vector<int> b) { int size=a.size(); int i=0; int cnt1=0,cnt2=0; while(i<size){ if(a[i]>b[i]) cnt1++; else if(a[i]<b[i])cnt2++; i++; } vector<int>ans; ans.push_back(cnt1); ans.push_back(cnt2); return ans; ...
ALGO
0.999985
4.595751
f017134e-1a6f-45d0-8952-34ec02bc328d
morishita8256/AtCoder
ABC/101-120/ABC116/C - Grand Garden.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define fi first #define se second #define all(x) (x).begin(), (x).end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define repp(i, a, b) for (int i = a; i <= (b); ++i) #define repr(i, a, b) for (int i = a; i >= (b); --i) typedef long long ll; cons...
ALGO
0.99999
4.382032
b3cb73a3-330a-4d41-a5ff-555bb3186359
YilK/Programming_exercise
洛谷/P1035.cpp
#include <iostream> using namespace std; int main() { int k; cin>>k; double sum=0; int i; for(i=1;sum<=k;i++) { sum=sum+1.0/i; } cout<<i-1<<endl; return 0; }
ALGO
0.999939
3.56091
10845f32-cc18-4528-a720-ccf7b4089acd
wickedlord/DSA_Problems
Binary Tree/zigzag_traversal.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val...
ALGO
0.999955
6.265594
b260bb7c-5b89-466e-bca3-83fc392111df
LaskinKirill/CPP.Control
control8.cpp
#include <iostream> class Time { public: int hours; int minutes; int seconds; char format[6]{}; Time()// { hours = 0; minutes = 0; seconds = 0; } Time(const Time& obj); Time concat(const Time& obj); bool setFormat(const char* format); Time(...
ALGO
0.924494
3.843966
0101f2da-941a-4b7e-9705-9fa8158fe859
chohyeongmin/algorithm
123더하기.cpp
#include <iostream> using namespace std; int D[11]; int add123(int n){ if(n == 1) return 1; if(n == 2) return 2; if(n == 3) return 4; if(D[n] > 0) return D[n]; D[n] = add123(n-1) + add123(n-2) + add123(n-3); return D[n]; } int main(void){ int n,input; cin >> n; int ans[n]; for(int i = 0 ; i < n ; i++...
ALGO
0.999946
3.508725
363e7ea6-4fe8-4912-a3d3-4a0569267915
yarou1025/Leetcode
0392.IsSubsequence.cpp
class Solution { public: bool isSubsequence(string s, string t) { if(s.length() == 0) return true; if(t.length() == 0) return false; int x = 0, i = 0; for(; i < s.length() and x < t.length(); i++){ while(x < t.length() and t[x++] != s[i]); } if(i ...
ALGO
0.999959
6.598085
8568cde4-aee9-4094-b918-3f2a10298b27
zionsc/leetcode
Linked List/3063. Linked List Frequency/3063.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* frequencies...
ALGO
0.999929
5.356695
c8549e42-3c7f-4d7e-a23e-726c7fe7be99
TimamBinSaifTahmid/Data-Structures
Array-Data-Structure/LeetCodeSolutions/LeetCode 1929. Concatenation of Array.cpp
class Solution { public: vector<int> getConcatenation(vector<int>& nums) { vector<int> result; int size=nums.size(); for(int i=0;i<size*2;i++){ if(i>=size){ result.push_back(nums[i-size]); } else result.push_back(nums[i]); } ...
ALGO
0.999742
5.512038
5cf15840-3ad4-4a7d-94d1-5109197a2834
deepin-community/musescore3
thirdparty/beatroot/Induction.cpp
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ #include "Induction.h" #include "Agent.h" #include "AgentList.h" #include <vector> #include <cmath> double Induction::clusterWidth = 0.025; double Induction::minIOI = 0.070; double Induction::maxIOI = 2.500; double Induction::minIBI = 0.3...
ALGO
0.999286
4.827607
9794fb92-6704-427c-aa3e-e2a3af9c77d0
ChuangRoy/RoyChuangs-Code
Algo/luogu/p1650.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; /* Template */ #define AC ios_base::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); #define ALL(x) begin(x),end(x) #define pb emplace_back #ifdef LOCAL #define debug(args...) LKJ("[ " #args " ]", arg...
ALGO
0.999966
3.359319
64afc1b0-e402-4224-a045-88adae434b46
artela-network/artela-solidity
libsolidity/analysis/ControlFlowRevertPruner.cpp
#include <libsolidity/analysis/ControlFlowRevertPruner.h> #include <libsolutil/Algorithms.h> #include <range/v3/algorithm/remove.hpp> namespace solidity::frontend { namespace { /// Find the right scope for the called function: When calling a base function, /// we keep the most derived, but we use the called contra...
TOOL
0.885544
7.4569
8b33d925-8fb1-4ea8-8deb-501057a72fde
DVMirchev/clogg
3rdparty/onetbb/examples/task_group/sudoku/sudoku.cpp
#include <cstdio> #include <cstdlib> #include <string> #include <atomic> #include "oneapi/tbb/tick_count.h" #include "oneapi/tbb/task_group.h" #include "oneapi/tbb/global_control.h" #include "common/utility/utility.hpp" #include "common/utility/get_default_num_threads.hpp" #pragma warning(disable : 4996) const uns...
ALGO
0.999649
6.093251
bb61e786-0b63-4043-9b99-27cbfb2e4564
michael0432/leetcode
c++/611.cpp
class Solution { public: bool isValid(int i, int j, int k){ return i + j > k; } int triangleNumber(vector<int>& nums) { sort(nums.begin(), nums.end()); int cnt = 0; for (int i = 0; i < nums.size(); i++){ for (int j = i + 1; j < nums.size(); j++){ ...
ALGO
0.999981
5.918712
677b5276-cda1-42e5-9f77-a283d453e81b
ESeokhwan/cpp-codingtest-practice
baekjoon/prob_2151/solution.cpp
#include <bits/stdc++.h> using namespace std; int n, res; char _map[50][50]; pair<int, int> st, en; bool visited[50][50][4]; pair<int, int> dirs[4] = { make_pair(-1, 0), make_pair(0, 1), make_pair(1, 0), make_pair(0, -1) }; void bfs() { queue<tuple<int, int, int, int> > q; for(int i = 0; i < 4; i++) { q...
ALGO
0.999916
3.964272
04f425c7-7c56-4a93-abdf-0faf4a129c83
MELANCHOLY123456/LeetCode_Cplusplus
basic_of_programming/LinkList/02-reverseList.cpp
// // Created by Administrator on 24-10-21. // struct ListNode { int val; ListNode* next; ListNode() : val(0), next(nullptr) { } explicit ListNode(const int x) : val(x), next(nullptr) { } ListNode(const int x, ListNode* next) : val(x), next(next) { } }; class Solution { public: ...
ALGO
0.999798
5.927452
111dcf60-4483-4083-be0b-23836e42657c
snmath-pi/DataStructures
450DSASHEET/BitManipulation/BitFlipToMakeEqual(3).cpp
//{ Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: // Function to find number of bits needed to be flipped to convert A to B int countBitsFlip(int a, int b){ // Your...
ALGO
0.99987
5.689134
8a1a81d3-5cee-4ea0-b3e9-85f024570536
Ehsanul-Karim-Pappu/backup_code_repo
Others/sorting_algo/comb_sort.cpp
#include <bits/stdc++.h> using namespace std; int getNextGap(int gap); void combSort(int a[], int n); int a[10]; int main() { //freopen("input.txt","r",stdin); int n; printf("Enter the size of the array: "); scanf("%d", &n); printf("Enter the element of the array: "); for (int i = 0; i < n; ...
ALGO
0.999715
5.041316
a9e44db7-9590-47d8-8681-45d879f1388d
veezee05/DSA-assignments
assign3.cpp
#include<iostream> using namespace std; class song { public: string song_title; song* next; song() { song_title = "NA"; next = NULL; } song(string d) { song_title = d; next = NULL; } }; class playlist { song* head; public: playlist() { head = NUL...
TOOL
0.998399
4.110153
0b38048b-73f7-4ee3-be53-96ba0408eaae
Aniket1398/LeetCode-Solutions
392-is-subsequence/392-is-subsequence.cpp
class Solution { public: bool isSubsequence(string s, string t) { int jj=s.size(); int ll=t.size(); int i=0,j=0; while(i<jj and j<ll) { if(s[i]==t[j]) { i++; } j++; } return i==jj ? 1:0; } };
ALGO
0.999969
6.122005
5bd53c83-fc18-415d-b85b-047b47c93c39
HotDB-Community/HotDB-Engine
extra/icu/icu-release-69-1/source/common/localeprioritylist.cpp
// localeprioritylist.cpp // created: 2019jul11 Markus W. Scherer #include "unicode/utypes.h" #include "unicode/localpointer.h" #include "unicode/locid.h" #include "unicode/stringpiece.h" #include "unicode/uobject.h" #include "charstr.h" #include "cmemory.h" #include "localeprioritylist.h" #include "uarrsort.h" #inclu...
TOOL
0.997271
7.041577
7f2720d1-66d8-4258-bf69-8e38dca63d04
ayushkaushal1522/dpquestions
rodcuttingproblem.cpp
#include<bits/stdc++.h> using namespace std; int func(int i, int n, vector<int> &price,vector<vector<int>> &dp) { if (i == 0) { return n*price[0]; } if(dp[i][n]!=-1) return dp[i][n]; int nottake = 0+func(i-1,n,price,dp); int take = -1e8; int rodlength = i+1; if (rodlength <= n) { take = price[i] + ...
ALGO
0.998655
4.781452
36467f1d-046f-4bbc-b49c-7343e71d7626
Loongson-Cloud-Community/hyperscan
src/nfa/goughcompile_accel.cpp
#include "goughcompile_internal.h" #include "gough_internal.h" #include "grey.h" #include "mcclellancompile.h" #include "util/container.h" #include "util/graph.h" #include "util/graph_range.h" #include "ue2common.h" #include <map> #include <vector> using namespace std; namespace ue2 { template<typename Graph> void...
ALGO
0.996599
3.669027
e82b498f-bb71-4809-a99a-983b790dc9f2
saadakmal460/PF
PF/PD-week-3/Task 8b (modulous).cpp
<<<<<<< HEAD #include <iostream> using namespace std; main(){ int number; int rem; int divOne; int remTwo; int divTwo; int remThree; int remFour; int sum; cout << "Enter four digit integer: " ; cin >> number; rem = number % 10; divOne = number / 10; remTwo = divOne % 10; divTwo = divOne / 10; re...
ALGO
0.996516
4.347425
888bc0a7-29cd-4fd3-bab0-0bfa94f4c46f
HMRUHUL/CP
.history/lc/65. Valid Number_20230915004913.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: bool isNumber(string s) { regex pattern("^[+-]?(\\d+\\.?|\\.\\d+|\\d+\\.\\d+)([eE][+-]?\\d+)?$"); return regex_match(s, pattern); } };
ALGO
0.98999
4.625701
c0bca187-c17d-490e-91a7-8d36c5eff13e
plenilune3/problem_solving_cpp
beakjoon/BaaaaaaaarkingDog/0x02/1919_애너그램 만들기.cpp
#include <cstdio> #include <cstring> #include <cmath> using namespace std; int main(int argc, char const *argv[]) { char A[1000], B[1000]; int A_count[26] = {0}; int B_count[26] = {0}; int count = 0; scanf("%s", A); scanf("%s", B); for (int i = 0; i < strlen(A); i++) A_count[A[i]...
ALGO
0.99996
3.895742
f58b2a22-d3f8-4eb1-9c97-0026e0a431ba
WilliamSmolla/SpaceGuts
SpaceGuts/dependencies/Box2D/testbed/tests/time_of_impact.cpp
#include "test.h" #include "box2d/b2_time_of_impact.h" class TimeOfImpact : public Test { public: TimeOfImpact() { m_shapeA.SetAsBox(25.0f, 5.0f); m_shapeB.SetAsBox(2.5f, 2.5f); } static Test* Create() { return new TimeOfImpact; } void Step(Settings& settings) override { Test::Step(settings); b2Sw...
TEST
0.865305
6.708003
2a1119fe-fb76-44c2-b7bf-eaf19199edfe
stormbreaker07/CodingQuestions
problem set 3/codeforces_problemsetproblem919B.cpp
#include <bits/stdc++.h> using namespace std; int fun(long long int d) {int x =0; while(d) { x += d%10; d = d/10; } return x; } int main() { int k; cin >> k; long long int x=0,digi; for( ; ; ) { if(k==0) {break;} x++; digi = fun...
ALGO
0.999971
3.702343
9c5aaa08-dee8-41a4-bbd1-7a580a32ea74
tin10401/CodeForces
E_XOR_on_Segment.cpp
//████████╗██╗███╗░░██╗██╗░░░░░███████╗ //╚══██╔══╝██║████╗░██║██║░░░░░██╔════╝ //░░░██║░░░██║██╔██╗██║██║░░░░░█████╗░░ //░░░██║░░░██║██║╚████║██║░░░░░██╔══╝░░ //░░░██║░░░██║██║░╚███║███████╗███████╗ //░░░╚═╝░░░╚═╝╚═╝░░╚══╝╚══════╝╚══════╝ // __________________ // | ________________ | // || ____ || // ||...
ALGO
0.99961
5.292616
68780e8d-239e-44d8-b5be-919f04103238
Gouravbht/Data-Structures-and-Algorithm
Deletionlinkedlist.cpp
#include<iostream> using namespace std; class node { public: int data; node* next; node(int val) { data = val; next = NULL; } }; void insertAthead(node* &head, int val) { node* n = new node(val); n->next = head; head = n; } void insertAtTail(node* &head, int val) { no...
ALGO
0.999852
4.561126
0e0550f4-bf6a-4af4-8e11-67b1a1241852
darshitsoftrefine/chat_app_with-_firebase
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.998733
6.76775
159840fb-5dd7-429c-b164-5132977e28ed
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Source/ThirdParty/Catch2/v3.4.0/src/catch2/internal/catch_textflow.cpp
#include <algorithm> #include <cstring> #include <ostream> namespace { bool isWhitespace( char c ) { return c == ' ' || c == '\t' || c == '\n' || c == '\r'; } bool isBreakableBefore( char c ) { static const char chars[] = "[({<|"; return std::memchr( chars, c, sizeof( chars ) - 1 )...
TOOL
0.947448
7.05207
80df99af-a445-4150-b6d6-d9befd888e7c
1exx/xray-1
xray/xrLC/nv_algebra.cpp
#include "stdafx.h" #pragma hdrstop #ifndef nv_algebraH #include "nv_math.h" #endif #ifndef _WIN32 #define _isnan isnan #define _finite finite #endif mat3::mat3() { } mat3::mat3(const nv_scalar* array) { Memory.mem_copy(mat_array, array, sizeof(nv_scalar) * 9); } mat3::mat3(const mat3 & M) { Memory.mem_cop...
TOOL
0.973509
3.602719
f5a01019-6cd5-4e4d-9b2b-a92ea4cd38f1
minh-tn-hust/store-online
bai9.cpp
#include <bits/stdc++.h> using namespace std; int mark[201] = {0}; int N, K1, K2; void TRY(int index, int lastWorkingDays){ if (index > N ) { if (mark[N] == 0){ for (int i = 1; i <= N; i++) cout << mark[i]; cout << endl; } else if (K1 <= lastWorkingDays && lastWorkingDays <= K2){ for (int i = 1; i <...
ALGO
0.999919
3.043681
bbda67cf-6044-4d01-9eba-4d78f0c9f738
ishandutta2007/codeforces
ffao/normal/449/D.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> ...
ALGO
0.99996
4.048665
65aab1c1-bc2e-49e9-8748-a92a9f3b96da
adityanjr/code-DS-ALGO
Data Structures/Arrays/imp/missing_number.cpp
/* @Author - Jatin Goel @Institute - IIIT Allahabad Hardwork definitely pays off. There is no substitute of hardwork. There is no shortcut to success. */ #include <bits/stdc++.h> using namespace std; #define LL long long #define F first #define S second #define fast_io ios::sync_with_stdio(false);cin.tie(NULL)...
ALGO
0.999855
3.574861
20f05480-b625-46ca-a4a9-05713e8d9973
HimanshuSuvata/Sudoku-Solver
SudokuPuzzle.cpp
#include "SudokuPuzzle.h" #include <iostream> #include <bits/stdc++.h> using namespace std ; SudokuPuzzle::SudokuPuzzle() { // Set to true to turn on tracers debug = false; // Initialize board for (int y=0; y<9; y++) { for (int x=0; x<9; x++) { board[x][y] = 0; } } } void SudokuPuzzle::print() { for (int y=0...
ALGO
0.998837
5.134148
84f752a0-ee3d-4fad-94cf-f8b0e3c41b9c
Gabi4213/DX11-Physics-Simulation
FrameworkDX11/CollisionHandler.cpp
#include "CollisionHandler.h" CollisionHandler::CollisionHandler() { } CollisionHandler::~CollisionHandler() { } bool CollisionHandler::CheckCollision(BoundingSphere sphere1, BoundingSphere sphere2) // Sphere vs Sphere { Vector3D distance; distance = sphere1._centre - sphere2._centre; // get distance float rad...
ALGO
0.957365
5.380426
b33789f5-0ea1-45c9-9f72-1a09f02be0b5
PaulinHehe/Graph-Contest-2024
tree_mcts.cpp
#include "tree_mcts.h" #include "fully_connected_layer.h" #include <cmath> TreeMCTS::TreeMCTS(const Network &net, const GameState &initState, double temp): children{{}}, parent{{-1, -1, 0, -1.0}}, value{-1.0}, temperature{temp}, startGameState{initState}, currentGameState{initState} { init(net); } void TreeMC...
ALGO
0.999654
5.102843
b7de951c-f66c-4759-a8ea-7ebac3181e6d
prashanthr11/Leetcode
Weekly Contest 197/Number of Good Pairs optiomised.cpp
class Solution { public: int numIdenticalPairs(vector<int>& a) { int cnt = 0; unordered_map<int, int> mp; for(auto i:a) { cnt += mp[i]; mp[i]++; } return cnt; } };
ALGO
0.999892
5.826858
4d7b1a8e-6957-44c9-83a3-65707c18f3c7
skui-org/skia
samplecode/SampleImageFilterDAG.cpp
#include "samplecode/Sample.h" #include "include/core/SkCanvas.h" #include "include/core/SkColor.h" #include "include/core/SkColorFilter.h" #include "include/core/SkFont.h" #include "include/core/SkImage.h" #include "include/core/SkImageFilter.h" #include "include/core/SkImageInfo.h" #include "include/core/SkPaint.h" ...
TOOL
0.972486
7.636345
cd131368-e054-4441-a873-4b29797fd014
Manvadariya/tree
graph/15-numberOfDistinctIslands.cpp
#include <bits/stdc++.h> using namespace std; // using DFS void dfs(int i, int j, vector<vector<int>>& grid, vector<vector<int>>& visited, vector<pair<int, int>>& island, int baseI, int baseJ){ if(i<0 || j<0 || i>=grid.size() || j>=grid[0].size() || visited[i][j] || grid[i][j] == 0){ return; } vis...
ALGO
0.999894
6.129121
52582f77-9872-4b7d-bdcc-ed6e49cd9ffd
ishandutta2007/codeforces
unused/normal/145/B.cpp
#include <bits/stdc++.h> using namespace std; void err() { printf("-1\n"); exit(0); } int main() { int a, b, c, d; scanf("%d%d%d%d", &a, &b, &c, &d); if (c == d) { if (a < c || b < c || (a <= c && b <= c)) err(); if (a > c) { printf("%s", string(a - c, '4').c_str()); for (int i = 0; i < c - 1; i++...
ALGO
0.999251
3.655079
aebd97cb-baa9-468f-9b48-7c3585b9c0e0
joyal0/CPP-BasicPrograms
numof_digits_innum_26.cpp
//C++ program to find number of digits in a number #include<iostream> using namespace std; int main() { long long int num,count=0,temp; cout<<"Enter the number to find the number of digits in it "; cin>>num; temp=num; while(temp!=0) { ++count; temp/=10; } cout<<"The numb...
ALGO
0.999718
4.598664
9acb4303-41c8-4474-9cd5-caedf223eec7
wwxxxx/leetcode
234.cpp
#include <bits/stdc++.h> using namespace std; static int x = []() { std::ios::sync_with_stdio(false); cin.tie(NULL); return 0; }(); struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: bool isPalindrome(ListNode *head) { ...
ALGO
0.999928
5.730784
d3706910-acad-434e-99bf-4e500d7d2654
mohamed-ehab415/Data-Structure-and-Algorithms-Homework
2 SLL Homework/08 SLL Homework 2 - 5 Easy to Medium Challenges/Delete even positions.cpp
#include <iostream> #include <cassert> #include <climits> #include <vector> // for debug #include <algorithm> #include <sstream> using namespace std; struct Node { int data { }; Node* next { }; Node(int data) : data(data) { } ~Node() { cout << "Destroy value: " << data << "\n...
ALGO
0.998513
4.792725
3028b6a8-67e6-4377-a0ee-41e90580f124
MuzamilDev/CPlusPlusMathLibrary
sumOfNaturalNo.cpp
#include<iostream> using namespace std; int main() { int n , i , sum=0; cout<<"Enter a number "<<endl; cin>>n; for(i=1; i<=n; i++) { sum=sum+i; } cout<<"The sum of 1+2+3... is equal to "<<sum<<endl; return 0; }
ALGO
0.99737
3.479514
ea858562-748c-43ea-8c96-c053ec016e63
mp290/ProgI
Cpp/H 19/H19.6/H19.6.cpp
/*Definire una funzione che prende in input un array monodimensionale di caratteri e restituisce l’indice dell’ultima consonante che si trova nello array in input. */ #include <iostream> using namespace std; int indice (char *vet, int n); int main (){ int n; cout<<"Inserisci la dimensione dell'array : "<<endl; ...
ALGO
0.991409
4.574715
55a17a64-f6c1-4e91-bb10-0f31ffd9a04c
HarisHidayatul/Balancing-Robot
Balancing Robot 2/src/main.cpp
#include <Arduino.h> #include <mpuDmp.h> #include <setMotor.h> #include <PID_v1.h> /*Direction 13 Step 12 Ms1 11 Ms2 10 Motor kiri Direction 9 Step 8 Ms1 7 Ms2 6*/ mpuDmp mpu = mpuDmp(); setMotor motor = setMotor(); /*********Tune these Values*********/ double setpoint; //set the value when the bot is perpendicular t...
ALGO
0.966976
3.800967
8a478b0d-30ed-4eaa-88ef-0a62751d500f
NikitaBukhta/multi-threading-learning
shared_data/thread_local/main.cpp
#include <iostream> #include <random> #include <thread> using namespace std::literals; //std::mt19937 mt; // result is different thread_local std::mt19937 mt; // result is the same for all threads; void func(void){ // Doubles in the range o to 1 std::uniform_real_distribution<double> dist(0, 1...
TOOL
0.961312
4.468899
d1051cf3-a818-4d51-9bb8-859dbff48455
rasel3780/URI-SOLUTION
1064.cpp
#include<bits/stdc++.h> using namespace std; int main() { double num, avg; int pos = 0; double sum = 0.0; for(int i=0; i<6; i++) { cin>>num; if(num>0) { pos++; sum = sum+num; } } avg = sum/pos; cout<<pos<<" valores positivos\n"; ...
ALGO
0.9996
3.460814
107da393-e03c-4d4a-bd47-511580c11764
leecottrellPTC/DataStructures2022
Week 2 - Control Strutures/ch5ex28.cpp
#include <iostream> #include <iomanip> #include <string> using namespace std; int main(){ double profit=30000, oldprofit=-1; double rent = 600; double units = 50; //as rent goes up by 40, units drop by 1 while(profit > oldprofit){ //profit is current units and rent, old is the previios ...
ALGO
0.999652
4.169317
f1c3c739-936f-4b5d-8bf4-fb877302acb3
RISHI2303/Leetcode-and-GFG-Questions
2054-two-best-non-overlapping-events/2054-two-best-non-overlapping-events.cpp
class Solution { public: int maxTwoEvents(vector<vector<int>>& events) { vector<array<int, 3>> times; for (auto& e : events) { times.push_back({e[0], 1, e[2]}); times.push_back({e[1] + 1, 0, e[2]}); } int ans = 0, maxValue = 0; sort(begin(times), end(t...
ALGO
0.999781
6.171213
57db5cc9-0efa-40c0-b54c-ff392fa81319
darwingr/BSc-Computer-Science
2020-01 - Winter/CSCI455/Lab1-Mandelbrot/hello_world.cpp
/* hello_world.cpp * --------------- * Authors: Darwin Jacob Groskleg, Laurence T. Yang * CSCI 455 Lab 1 * * Purpose: Print a greeting to the root processor, then all processors. * * Question: Can you complete the following “Hello World”” program and * run with 4, 8 and 16 CPU processors? */ #includ...
ALGO
0.95172
4.743055
e5e37b55-8dc4-4104-a4f6-0f50ef99882a
Jocastle98/codetree-TILs
240903/100으로 나눈 나머지의 수열/sequence-of-remainder-divided-by-100.cpp
#include <iostream> using namespace std; int fuc(int n){ if(n==1) return 2; if(n==2) return 4; return (fuc(n-1)*fuc(n-2))%100; } int main() { // 여기에 코드를 작성해주세요. int n; cin>>n; cout<<fuc(n); return 0; }
ALGO
0.999979
4.653407
d310a63a-bbab-4d06-b699-38bab7c77eb7
Mmm-max/mirea
2/1.cpp
#include <iostream> #include <cmath> // Конус int main() { double R, r, l, h, s, v, p, l_2; p = 3.14; std::cout << "Введите большое основание конуса: "; std::cin >> R; std::cout << "Введите малое основание конуса: "; std::cin >> r; std::cout << "Введите высоту конуса: "; std::cin >> h;...
ALGO
0.993614
4.583915
4f4a9d9b-39d1-411e-926f-09d8d6c5dab0
fazlerabbishuvobd/Audio_Player-App
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.9988
6.76073
be44cccf-3c89-4d96-88f9-d025d4e8f093
Doveqise/Cloud
Codes/C++/1308.cpp
#pragma GCC optimize(3) #pragma GCC target("avx") #pragma GCC optimize("Ofast") #pragma GCC optimize("inline") #pragma GCC optimize("-fgcse") #pragma GCC optimize("-fgcse-lm") #pragma GCC optimize("-fipa-sra") #pragma GCC optimize("-ftree-pre") #pragma GCC optimize("-ftree-vrp") #pragma GCC optimize("-fpeephole2") #pra...
ALGO
0.999812
3.967225
75506267-20e1-43f2-bd4e-b2d07151d1c6
Alexisflipi/Club-de-Algoritmia
Online-judge/Codeforces/801B.cpp
#include <bits/stdc++.h> using namespace std; int main() { string x, y; cin >> x >> y; bool flag = 1; for (int i = 0; i < x.size(); i++) { if (x[i] < y[i]) {flag = 0; break;} } cout << ((flag) ? y : "-1") << '\n'; return 0; }
ALGO
0.999952
4.074953
86024aae-3808-463b-bfdd-c00fe670441c
AlAuAu/perf_exercise
labs/misc/warmup/solution.cpp
#include "solution.h" int solution(int *arr, int N) { return (N*(N+1))/2; }
ALGO
0.999591
4.759437
713c5d22-daa2-42fe-9c06-425c1a88144a
nkunal1992/Code_lite
CPP/Section 20 The-Standard-Template-Library-(STL)_/Set/main.cpp
// Section 20 // Set #include <iostream> #include <set> class Person { friend std::ostream &operator<<(std::ostream &os, const Person &p); std::string name; int age; public: Person() : name{"Unknown"}, age{0} {} Person(std::string name, int age) : name{name}, age{age} {} bool operator...
TEST
0.880452
5.323715
51634e80-ca8d-4675-947e-ef13850a8b1a
sjhwang0/codetree-TILs
240328/특정 숫자 도달하기/reaching-specific-number.cpp
#include <iostream> using namespace std; int main() { int a[10], sum = 0, cnt = 0; for(int i = 0;i < 10;i++){ cin >> a[i]; } for(int i = 0;i < 10;i++){ if(a[i] >= 250) break; sum += a[i]; cnt++; } double avg = (double)sum / cnt; cout << fixed; cout.pr...
ALGO
0.998561
3.477916
6e756989-eab6-4a66-851d-dc3c68f1a6ae
qqwqqk/LeetCode
source/4_MedianOfTwoSortedArrays.cpp
#include "../header/code_hard.h" class Solution { public: double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { double result; int n1 = nums1.size(), n2 = nums2.size(); int number = n1 + n2, tag = number % 2; if (n1*n2 == 0){ if (n1 == 0){ if (tag == 1) result = num...
ALGO
0.999989
6.002964
3eb0450d-4637-4eb1-9bf0-d8efb1541e83
JyotiAggarwal2/technicalresources1
a1_q10.cpp
#include<iostream> using namespace std; int main() { int num,i=2; cout<<"Enter a number: "; cin>>num; cout<<"The prime factorization is: "; while(i<=num){ if(num%i==0){ cout<<i<<" "; num=num/i; } else{ i++; } } return 0; }
ALGO
0.999126
3.333519
e1f4362a-959c-4e58-9111-214cd8f437a6
xMaycol08/Estructura-de-Datos
Tipos de Recursividad/anidada.cpp
/*********************************************************************** * Module: anidada.cpp * Author: Maycol Celi * Date: 13/11/2024 * Purpose: Conversion de tipo de datos * University: Universidad de las Fuerzas Armadas - ESPE ***********************************************************************/ #include...
ALGO
0.99812
5.881945
bac18ae7-c564-4e3c-84fc-30243116186a
g-gisbert/Neural-Inpainting-Of-Folded-Fabric-Meshes
HoleMeshTo2D/deps/libIGL/include/igl/directed_edge_parents.cpp
template <typename DerivedE, typename DerivedP> IGL_INLINE void igl::directed_edge_parents( const Eigen::MatrixBase<DerivedE> & E, Eigen::PlainObjectBase<DerivedP> & P) { using namespace Eigen; using namespace std; typedef Eigen::Matrix<typename DerivedE::Scalar, Eigen::Dynamic, 1> VectorT; VectorT I = Vec...
ALGO
0.987464
5.560305
f4f539bc-b932-41fb-927a-ac8a1d35f3b5
priyamsinghh/Leetcode-cpp-daily-practice
0217-contains-duplicate/0217-contains-duplicate.cpp
class Solution { public: bool containsDuplicate(vector<int>& nums) { bool f=false; map<int,int>m; for(int i=0;i<nums.size();i++) { m[nums[i]]++; } for(auto x:m) { if(x.second>=2) f=true; } return...
ALGO
0.99978
5.733922
fa3f7185-d8c5-475b-bf32-a8bd7aed8ade
PritishDoc/DSA-in-C-
Leetcode_Problem/printa.cpp
/* Print Anagrams Together Difficulty: MediumAccuracy: 65.78%Submissions: 82K+Points: 4 Given an array of strings, return all groups of strings that are anagrams. The groups must be created in order of their appearance in the original array. Look at the sample case for clarification. Note: The final output will be in ...
ALGO
0.999982
6.825092
8a8c6c32-7406-482a-818a-b94fff532ee4
Fejbien/Data-Types
Queue.cpp
#include <iostream> // Data type: Queue /* Fixed array: Enqueue() + Dequeue() + Empty() + Full() + Size() + Linked list: Enqueue() + Dequeue() + Empty() + */ namespace QueueFixedArray { template <class T> class Queue { public: Queue(int size); ~Queue(); void Enqueue(T value); T Dequeue(); ...
TOOL
0.965792
4.64052
3837bb49-309b-430b-9976-a4a04a38d5e2
tiqwab/atcoder
abc222/c/solution_with_custom_comparator.cpp
#include <algorithm> #include <cassert> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #include <limits.h> using namespace std; typedef long long ll; template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } ...
ALGO
0.999991
4.096431
fd1156ae-ef57-46b3-822a-18061fc60f57
a5tronomy/ue5-ffcotw
Engine/Source/Runtime/SignalProcessing/Private/Flanger.cpp
#include "DSP/Flanger.h" #include "DSP/FloatArrayMath.h" namespace Audio { const float FFlanger::MaxDelaySec = 5.0f; const float FFlanger::MaxModulationRate = 20.0f; const float FFlanger::MaxCenterDelay = 20.0f; FFlanger::FFlanger() { } FFlanger::~FFlanger() { } void FFlanger::Init(const float InSampleRat...
TOOL
0.967233
5.936098
b1436c1d-e3fd-4c49-9dc8-0652aca2395b
makomk/cajeput
bullet/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
#include "btMinkowskiPenetrationDepthSolver.h" #include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" #include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" #include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" #include "BulletCollision/CollisionShapes/btConvexShape.h" ...
ALGO
0.999645
5.929208
51304aeb-5540-433e-ae7b-4dbabf919d52
Next-Gen-UI/Hacktober
LoveBabbar/05_linked_list/15_middle_ele_of_linklist.cpp
/* link: https://leetcode.com/problems/middle-of-the-linked-list/submissions/ case 1: fast->next will be NULL 1->2->3->4->5 when fast->next will be NULL slow will be at 3. case 2: fast->next->next will be NULL 1->2->3->4->5->6 when fast->next->next will be NULL slow will b...
ALGO
0.999941
6.120576
0a7c5b33-ca72-4b50-9b49-0effbbb886fb
ayusharyan13/netflixClone
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.998733
6.76775
88576fef-b6b5-4ddc-9bce-4a47369b8e51
bo1led-owl/competitive-template
main.cpp
#include <bits/stdc++.h> #include <immintrin.h> using namespace std; namespace { using uint = unsigned int; using ll = long long; using ull = unsigned long long; template <typename T> void dbg(const T& x) { #ifndef ONLINE_JUDGE cerr << "\tdbg: " << x << '\n'; #endif } template <typename T> T ipow(T n, T p) { ...
ALGO
0.998757
3.286311
1a9afab1-76bc-477e-80f3-12fc51f2a56d
krakensurf/mandelbulber
mandelbulber2/formula/definition/fractal_abox_mod_kali_v2.cpp
/** * Mandelbulber v2, a 3D fractal generator _%}}i*<. ______ * Copyright (C) 2020 Mandelbulber Team _>]|=||i=i<, / ____/ __ __ * \><||i|=>>%) / / __/ /___/ /_ * This file is part of Mandelbulber. )<=i=]=|=i<> / /__ /_ __/_ __/ * The project ...
ALGO
0.996982
4.725868
c1a53a6a-794d-415f-a0bd-bc7e3d00588b
WTlumos/PAT-A
1081/1081.8.26.cpp
#include<cstdio> #include<algorithm> using namespace std; long long gcd(long long a,long long b) { if (b==0) { return a; } else{ return gcd(b,a%b); } } struct node { long long up,down; }; void init(node &f) { if (f.down<0) { f.up=-f.up; f.down=-f.down; } if (f.up==0) { f.down=1; }else{ long long...
ALGO
0.999083
3.995562
75f6cfde-c790-40e2-ab5d-09afc28be54b
AidenWang0511/CompetitiveCoding
DMOPC '14 Exam Time P5.cpp
#include <bits/stdc++.h> using namespace std; const int MN = 51, MT = 1001; int N, S, e[MN], h[MN], p[MN], dp[MN][MT], t[MN][MT]; int main(){ cin>>N; for(int i=1; i<N+1; i++) { cin>>h[i]>>e[i]>>p[i]; } cin>>S; for(int i=1; i<N+1; i++) { for(int j=0; j<S+1; j++) { dp[i]...
ALGO
0.999915
3.26966
3892ab8e-67e6-4b87-ac86-342440b1a665
Jatin-Kumar-Thakur/D_S_A
0_Practice/1_Arr/6_Min_Max.cpp
// find minn and max using minimum no.of comparision #include <iostream> using namespace std; void print(int arr[], int size) { for (int i = 0; i < size; i++) { cout << arr[i] << " "; } cout << endl; } // method 1 is using sorting but i takes O(nlogn) complexity // so here i use method 2 hi...
ALGO
0.999823
4.636674
bfb2c084-ca05-40d5-bc90-517fcaf53c32
ishandutta2007/codeforces
siberian/normal/1149/B.cpp
#include <bits/stdc++.h> using namespace std; const int INF = 1e9 + 10; const int MAXN = 2 * 1e5 + 10, MAXSZ = 26; int help[MAXN][MAXSZ]; int n, q; string s; void make() { for (int i = 0; i < MAXN; i++) for (int j = 0; j < MAXSZ; j++) help[i][j] = INF; for (int i = n - 1; i >= 0; i--) { for (int j = 0; j ...
ALGO
0.999884
4.135745