uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
c583a8e8-8a6f-44c7-ab2c-c0d572f92479
Ayusohm432/Coding
ProblemOfTheDay/Geeksforgeeks/2025/3. March/16. Minimum Jumps.cpp
/* Problem Link: https://www.geeksforgeeks.org/problems/minimum-number-of-jumps-1587115620/1 */ /*Minimum Jumps You are given an array arr[] of non-negative numbers. Each number tells you the maximum number of steps you can jump forward from that position. For example: If arr[i] = 3, you can jump to index i + 1, i ...
ALGO
0.999962
5.57513
e454b05d-20a6-4cea-a269-efccf4f855ed
kseokc/algorithm
삼성전자 문제/비트마스킹/불면증 치료법(1288).cpp
// // Created by 김석찬 on 2023/07/20. // #include <iostream> using namespace std; int T, ans, num; int find(int n) { int result = 0; int n_=n; while (1) { int tmp=n_; while (tmp > 0) { result |= 1 << (tmp % 10); tmp /= 10; } if (result == (1 << 10)...
ALGO
0.999467
5.367994
48692e6e-4c65-42ab-b469-e9ce3b02269b
aidapanca/POO2023
Lab2/Exercitiul2/main.cpp
#include <iostream> #include "student.h" #include "functions.h" int main() { Student s1("Popescu Ion"); s1.setMathGrade(9.5); s1.setEnglishGrade(8); s1.setHistoryGrade(7.5); Student s2("Andreea Maria"); s2.setMathGrade(8); s2.setEnglishGrade(9); s2.setHistoryGrade(8.5); cout << "M...
TOOL
0.907144
5.378968
e78bf8eb-d788-4b8c-94da-2e881499a08b
JCx64/ELEC391_self_balancing_robot
ESP32_main_v2/.history/src/main_20250310170952.cpp
#include <Arduino.h> #include "angle_measurement.h" #include "set_pwm.h" #include "pid_alg.h" #include "esp_timer.h" #include "HardwareSerial.h" #include "stdint.h" #include "encoder.h" #include "myiic.h" #define TIMER1_INTERVAL_MS 1.f #define BALANCE_ANGLE 5.f AngleClass robot_angle; EncoderClass robot_encoder; PWMC...
TOOL
0.86095
4.578175
6a7dce73-f6b2-4a54-aa74-66caa44b6a47
EdoardoZappia/Exercises-Advanced-Programming
ex3-05/lib/newton.cpp
#include "newton.hpp" #include <cmath> #include <limits> #include <functional> template <typename T> NewtonSolver<T>::NewtonSolver(const std::function<T(const T &)> &f, const std::function<T(const T &)> &df, const T &x0, const double &tolerance, ...
ALGO
0.999172
6.092793
03ded48b-a0c8-410e-917b-a016d85de930
Ziklon/algorithms
uva/11470.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.997612
3.063226
71b3cbb3-5b7b-4044-96db-e78f89f13260
ShelpAm/competitive_programming
competitest/Luogu/unknown_contest/P7725 珍珠帝王蟹(Crab King)/main.cpp
// Problem: P7725 珍珠帝王蟹(Crab King) // Contest: unknown_contest // Judge: Luogu // URL: https://www.luogu.com.cn/problem/P7725 // Memory Limit: 256 // Time Limit: 1000 // Start: Tue 14 May 2024 07:51:48 PM CST // Author: ShelpAm #include <bits/stdc++.h> #ifdef __cpp_lib_ranges #include <ranges> #endif using i64 = std...
ALGO
0.999977
5.027697
4001f06f-76d1-4109-ae74-749a0310af93
AbhJ/some-cp-files-2
codeforces1101D.cpp
//Coded by Abhijay Mitra #include <iostream> #include <stdlib.h> #include <algorithm> #include <cstdio> #include <numeric> #include <cstring> #include <numeric> #include <unordered_map> #include <vector> #include <iterator> #include <map> #include <set> #include <climits> #include <queue> #include <iomanip> #include ...
ALGO
0.99827
3.677645
dd96c22d-69b3-4cf9-a025-94209f36e5f6
fkuhne/mobilesim
sdlNavigatorMT/OccupancyGrid.cpp
#include "OccupancyGrid.h" #include <string.h> #include <stdio.h> #include <math.h> OccupancyGrid::OccupancyGrid() { for(int i = 0; i <= WINDOW_SIZE_X; i++) { for(int j = 0; j <= WINDOW_SIZE_Y; j++) { grid[i][j].bayes = 0.5; grid[i][j].himm = 0; grid[i][j].visited = false; grid[i][j].alph...
ALGO
0.999216
5.054944
7dbc8d7c-b49f-4e5f-a9d0-612642b1715f
Abhishekrauniyar2906/GFG_Solutions
Difficulty: Medium/Factorials of large numbers/factorials-of-large-numbers.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: vector<int> factorial(int N){ vector<int>ans; ans.push_back(1); int carry = 0; for(int i = 2; i <= N;...
ALGO
0.999868
6.549784
cf4c7c4c-37eb-495d-a1fe-c138fe74e745
hmofrad/CodingPractice
skinnyleetcode/toHex.cpp
/* * Problem: https://leetcode.com/problems/add-strings/ * Compile: g++ -o toHex toHex.cpp -std=c++11 && ./toHex #-fsanitize=address * (c) Mohammad Hasanzadeh Mofrad, 2019 * (e) <EMAIL> */ #include <stdlib.h> #include <stdio.h> #include <string> #include <vector> //char num2char std::string toHex(int num)...
ALGO
0.992893
5.606318
c6198980-47b3-45fb-b48a-039fefa8527f
legrand77/home_work_2_10
LibraryDynamic_4/Home_Work_2_10_4/Home_WORK_2_10_4.cpp
#include <iostream> #include <string> #include "equilateralTriangle.h" #include "figura.h" #include "isoscelesTriangle.h" #include "parallelogram.h" #include "quadrilateral.h" #include "rectangle.h" #include "rhomb.h" #include "square.h" #include "straighTriangle.h" #include "triangle.h" #include "print_info.h" int ma...
TOOL
0.866806
3.214262
46169ce7-2ede-4178-a576-ffa73d74f0e7
NREL/AirflowNetwork
dependencies/eigen-eigen-323c052e1731/doc/examples/tut_arithmetic_scalar_mul_div.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { Matrix2d a; a << 1, 2, 3, 4; Vector3d v(1,2,3); std::cout << "a * 2.5 =\n" << a * 2.5 << std::endl; std::cout << "0.1 * v =\n" << 0.1 * v << std::endl; std::cout << "Doing v *= 2;" << std::endl; v *= 2; std::cout << ...
ALGO
0.995447
3.669638
c1c0d2c5-f504-4f49-9b5a-d851834dfcc7
benHobbs/cs165
wk9/recursiveBinarySearch.cpp
/*************************************************************************************************** ** Author: Benjamin Hobbs ** Date Created: 3/6/2014 ** Lab/Project#: Excersise 16, Problem 2 ** Filename: recursiveBinarySearch.cpp ** Overview: This program contains a template for the recur...
ALGO
0.999989
7.056126
53c8fbb8-12b5-423c-95ab-6a754caa9faa
WhereIsHeroFrom/cpp_base_algorithm
10、计数排序/计数排序模板.cpp
#include <iostream> #include <vector> using namespace std; void countingSort(vector<int>& a, int m) { int n = (int)a.size(); int* count = new int[m + 1]; memset(count, 0, sizeof(int) * (m + 1)); for (int i = 0; i < n; ++i) { count[a[i]]++; } int s = 0; for (int v = 0; v <= m; ++v) {...
ALGO
0.999848
4.736384
39678052-d8e2-4b49-98fa-37b76ece4ee6
ishandutta2007/codeforces
ivan100sic/normal/15/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; ll e(ll x) { if (x % 4 == 0) return x; else if (x % 4 == 1) return 1; else if (x % 4 == 2) return x+1; else return 0; } int main() { ios_base::sync_with_stdio(false); cin.tie(null...
ALGO
0.999771
4.722959
3719116a-d303-47cb-b37c-290519808cf3
Stevengodtjt/C-plus-plus-basic-program-example
课后习题/第四章 函数/选择填空/例6.cpp
#include<iostream> using namespace std; int f(int x) { int y; if(x==0||x==1) return 3; y=x*x-f(x-2); return y; } int main() { cout<<f(3)<<endl; return 0; }
ALGO
0.999981
4.062371
6d491588-f769-4aa4-8f97-8cb225e555f4
saravanakumar812/login
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.998784
6.761023
e2526bcf-f730-40c6-8c71-0f085cdda583
ARTSAT/DESPATCH
ground_station/tracker/software/core/Shinen2Tracker/eigen-eigen-6b38706d90a9/bench/sparse_product.cpp
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out //g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out // -DNOGMM -DNOMTL -DCSPARSE // -I /home/gael/Coding/LinearAlgebr...
ALGO
0.996704
4.164869
e8cbca05-69d7-4334-b965-e7149c0aaa01
ghozt777/cp
practice/cpp/PrefixSum/main.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vii; typedef pair<int,int> pi; typedef map<string , int> msi; #define IN emplace #define PBK pop_back #define PB push_back #define MP make_pair #define f(n) for(int i = 0 ; i < n ; i++) #define fr(itr, n) fo...
ALGO
0.999552
4.276475
19f5a451-a15e-47ba-a82c-8603d9030d8e
donzoru/Leetcode
3_Longest_Substring_Without_Repeating_Characters.cpp
class Solution { public: int lengthOfLongestSubstring(string s) { bool has[128]={false}; int ans=0; for(int i=0,j=0;i<=j;){ while(j<s.length() && has[s[j]]==false){ has[s[j]] = true; ++j; } if(j-i>ans) ans = j-i; ...
ALGO
0.999853
5.836947
89b27d8d-79e3-4f19-92f7-b86a6ee2cbd2
21A91A05C1/GeeksforGeeks
Easy/Remove all duplicates from a given string/remove-all-duplicates-from-a-given-string.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: string removeDuplicates(string str) { // code here map<char,int>mpp; string ans=""; for(int i=0;i<str.size();i++) { if(mpp[str[i]]==0) ...
ALGO
0.999868
6.528666
a65a83d4-74b3-4b1a-bb2f-c4b3319addc7
keshav25201/data-structure-and-algo
linked list/Remove_Duplicates_In_A_Sorted_Linked_List.cpp
#include <iostream> #include <string> #include <bits/stdc++.h> using namespace std; struct node { int key; node *next; node(int key) { this->key = key; next = NULL; } }; class linkedlist { public: node *head; node *tail; int size; linkedlist(){ head = NULL; ...
ALGO
0.999987
4.953804
a07706b0-608a-4c2e-979a-6c82dac8d8a1
XavierFox12/CodingPortfolio
Hocking College C++/Xavier_Fox_Chp_16_Exercise_20/Xavier_Fox_Chp_16_Exercise_20/Xavier_Fox_Chp_16_Exercise_20.cpp
/* Program: Xavier_Fox_Chp_16_Exercise_20.cpp Programmer: Xavier Fox Date: 13 Apr. 2015 Purpose: To determine the students grades and averages in the world history class. */ #include "stdafx.h" #include <iostream> #include <iomanip> #include <string> #include <fstream> using namespace std; const int NUMO...
TOOL
0.93401
5.083636
90aacc2d-0452-437f-ab94-e70a5f8e8101
ao333/CPP
ICL Lectures/Program Design and Logic/2 Object Oriented Design & Programming/2.2S Library.cpp
#include <iostream> #include <string> using namespace std; class Item; class LibraryUser { private: string name; int items_borrowed_count; Item *items_borrowed[3]; public: LibraryUser(string n) : name(n) { items_borrowed_count = 0; for (int c=0; c<3; c++) items_borrowed[c] = NULL; } bool bo...
TOOL
0.929543
4.567047
a235d9e9-8b64-46b6-9c8b-c6348eed207b
Sanchay117/codeforces_solutions_2
Uninteresting_Number_2050C.cpp
#include <iostream> #include <vector> #include <string> using namespace std; void solve() { string s; cin >> s; vector<int> digits; int sm = 0, twos = 0, threes = 0; for (char c : s) { int digit = c - '0'; digits.push_back(digit); sm += digit; if (digit == 2) twos++; if (digit == 3) threes++; } for...
ALGO
0.999963
5.684514
a3d02fc8-2e7c-4324-967b-8b2b0893363d
SanketDeshmukh007/Data-Structures-and-Algorithms
Matrix OR 2D Array/Wave_Order_Print.cpp
#include<bits/stdc++.h> using namespace std; vector<int> WaveOrderPrint(vector<vector<int>> matrix) { vector<int> ans; int row = matrix.size(); int col = matrix[0].size(); int top = 0; int bottom = row - 1; for(int j = 0; j < col; j++) { // if col is even if(j % 2 == 0) ...
ALGO
0.999967
4.814796
50896dd6-5acb-4745-8da9-049e4ac926f7
ArchitKumar1/LeetCode-Submissions
check-if-move-is-legal/Accepted/8-8-2021, 10:13:58 AM/Solution.cpp
// https://leetcode.com/problems/check-if-move-is-legal class Solution { public: bool checkMove(vector<vector<char>>& b, int i, int j, char c) { int dx[8] = {0,1,1,1,0,-1,-1,-1}; int dy[8] = {1,1,0,-1,-1,-1,0,1}; int n = b.size(),m = b[0].size(); bool ans = 0; for(int k = 0;...
ALGO
0.999871
6.053093
12ebdcd7-42a7-4c29-aa67-a24c5ecc963b
IvanKubSAU/git-hub-AaP
Lab7/Lab7_1/Lab7_1.cpp
#include <iostream> #include <math.h> using namespace std; double S; int n, k; void main() { S = 0; k = 1; cout << "n = "; cin >> n; double d; for (int i = k; i <= n; i++) { d = 1; for (int j = 2; j <= i; j++) { d *= j; } S += pow(i - 4, 3) * (i + 7) / d; } cout << "S = " << S << endl; sys...
ALGO
0.999744
3.522796
a85a5325-da73-4a0e-b0db-b77ba7262374
Strong10mede/C_C--
Div2/892/q1.cpp
#include<bits/stdc++.h> #define ll long long int #define SORT(a) sort(a.begin(), a.end()) #define FOR(a,b, n) for (ll a = b; a < n;a++) #define vi vector<ll> #define vii vector<vector<ll>> #define pii pair<ll,ll> using namespace std; void sol(){ ll n; cin>>n; vi a(n); vi b, c; FOR(i,0,n){ ci...
ALGO
0.999179
3.692141
5108f640-5a34-4fe7-9135-dda666f09adb
codesmith17/CODECHEF
Possible_or_Not.cpp
#include <iostream> #include <map> #include <algorithm> #include <numeric> #include <set> #include <cmath> #include <string> #include <utility> #include <vector> #include <unordered_map> #include <climits> using namespace std; bool checkSubsequence(std::vector<int> &nums, int target) { int n = nums.size(); ...
ALGO
0.999763
5.574296
82a8273c-eb0c-46b5-96d5-c99bc6b0285b
ananyachawla1/august-dsa
binarySearch/onAnswers/MaxWTonConveyer.cpp
class Solution { public: bool chk(vector<int> &weights, int mid, int days){ int cnt = 1; int currsum = 0; for(int i=0; i<weights.size(); i++){ currsum += weights[i]; if(weights[i]>mid) return false; if(currsum>mid){ currsum = weights[i]; ...
ALGO
0.999991
5.730516
064765b9-ee12-4a08-89fc-0d3d9823e5eb
HauyuChen/LeetCode
541-Reverse-String-II.cpp
541. Reverse String II Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there are less than k characters left, reverse all of them. If there are less than 2k but greater than or equal to k characters, then reverse the first k ...
ALGO
0.999475
5.641967
ecbacdeb-f02e-44f4-9344-9e5b13e3ee49
urstrulyharshx/LeetCode
Value equal to index value - GFG/value-equal-to-index-value.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: vector<int> valueEqualToIndex(int arr[], int n) { // code here vector<int> result; for(int i=0;i<n;i++) { if(arr[i]==i+1) { ...
ALGO
0.999499
5.575388
d6aeba7c-3d33-4c6c-9ad1-e36b519efc2d
PaulLandaeta/algoritmica2
contenido/teoria de numeros/primes.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef map<int, int> mii; ll _sieve_size; bitset<10000010> bs; // 10^7 is the rough limit vll p; //[2,3,5,7] // compact list of prim...
ALGO
0.999718
4.323631
cb95b419-f194-4db7-9ffa-b8085281ceb7
Devexhh/Codes
secant.cpp
#include <bits/stdc++.h> using namespace std; double f(double x) { return cos(x) - x * exp(x); } void secant(double x0, double x1, int maxIterations, double tolerance) { double x2; for (int i = 0; i < maxIterations; i++) { x2 = x1 - (f(x1) * (x1 - x0)) / (f(x1) - f(x0)); if (fabs(f(x2)) < ...
ALGO
0.999938
5.021366
8fa9849f-a87d-4e10-b6c6-1f406963203a
noisrucer/Algorithm
String/#125 Valid Palindrome.cpp
class Solution { public: #define Q (('A'<=s[start] && s[start]<='Z') || ('a'<=s[start] && s[start]<='z') ||) #define R (('A'<=s[end] && s[end]<='Z') || ('a'<=s[end] && s[end]<='z')) bool isPalindrome(string s) { int n = s.length(); if(n==0 || n==1) return true; int i=0; int j=n-1; ...
ALGO
0.998811
5.88492
0ddf9e76-64bd-467d-9de1-7505a12a4f2e
hks23/complete_DSA
Graphs/01Implementaion.cpp
/*BFS and DFS traversal of a Graph */ #include <iostream> #include <vector> #include <unordered_map> #include <list> #include <queue> using namespace std; template <typename T> // by this we can define datatype of T class Graph { public: unordered_map <T, list<T>> adjList; void addEdge(T u, T v, bool directio...
ALGO
0.999417
5.618413
a168b605-9ee5-4e29-a124-b7c496d87111
pedrodelyra/competitive-programming
iesb/O(log n).cpp
#include <bits/stdc++.h> using namespace std; using lld = long long int; int main() { lld n; scanf("%lld", &n); lld l = 1, r = n, sqroot = 0; while(l <= r and sqroot == 0) { lld m = l + r >> 1; if(m * m == n) { sqroot = m; ...
ALGO
0.999701
4.020311
596a1566-44bc-46e8-9878-098452e63aa5
Armour/Learning_OpenCV
OpenCV/FindContours.cpp
#include "my_cv.h" static Mat src; static Mat dstOpen; static Mat dstClose; static Mat dstGradient; static Mat dstTophat; static Mat dstBlackhat; static Mat dstErode; static Mat dstDilate; static Mat dstGradientGray; static Mat dstFlood; static Mat dstErodeFlood; static Mat dstFloodGray; void FindContours(void) { ...
ALGO
0.988061
3.416771
abafde9c-68ec-4668-a114-9218e8d5fa08
vijaymanikantareddy/LeetCode_GFG_solved
Difficulty: Medium/Next Greater Element/next-greater-element.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to find the next greater element for each element of the array. vector<int> nextLargerElement(vector<int>& arr) { // code here stack<int> st; int n = arr.siz...
ALGO
0.995568
6.783109
e2e6d792-b90d-4d31-ac0e-0007a89f93f2
cool-programmer101/Phitron-Batch-4
Week4/Day2/A_Minimum_XOR.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define vi vector<int> #define vll vector<long long int> #define vd vector<double> #define vs vector<string> #define mod 1000000007 void solve() { ll n,x=0; cin>>n; vector<ll>a(n); for(int i=0;i<n;i++) { ...
ALGO
0.999938
4.881181
fcd004bc-29cd-4f71-9fed-02636a36e0a8
kastur/artificial_birds
bullet/Demos/InternalEdgeDemo/InternalEdgeDemo.cpp
#include "GLDebugFont.h" //#define SHIFT_INDICES 1 #define SWAP_WINDING 1 //#define ROTATE_GROUND 1 bool enable=true; #if defined (SHIFT_INDICES) && !defined (SWAP_WINDING) //#define TEST_INCONSISTENT_WINDING #endif #include "btBulletDynamicsCommon.h" #include "BulletCollision/CollisionDispatch/btInternalEdgeUtility...
ALGO
0.931238
3.212781
f4ea69fa-15b9-4ca0-8e9b-8dfb8f43bc15
CPC-UTEC/theory
2020-I/Lessons/5/code/prime1.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; bool prime = true; for (long long i = 2; i * i <= n; i++) { if (n % i == 0) { prime = false; } } if (prime) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
ALGO
0.999864
5.443715
c244a098-403d-4a9f-95e6-1cfaa2488727
Anubhavjaiswal21/DSA
2792-neighboring-bitwise-xor/neighboring-bitwise-xor.cpp
class Solution { public: static bool doesValidArrayExist(vector<int>& derived) { return accumulate(derived.begin(), derived.end(), 0, bit_xor<>())==0; } };
ALGO
0.998585
5.593715
7305df61-6da1-4fc4-b8db-0089cb4efa04
thisismr900/CodeForces_Contests
3. Codeforces Round 916 (Div. 3)/F.cpp
//Bismillahir Rahmanir Raheem #include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int n; cin>>n; vector<int>e(n); e[0]=-1; for(int i=1; i<n; i++) cin>>e[i]; map<int,int>mp; for(int i=1; i<e.size(); ...
ALGO
0.999535
4.001651
f6b2a06d-00bd-454e-a46d-f504e08b1c66
jakolsz11/Polski_spoj
Łatwe/61. Zliczanie liczb i wyrazow/zliczanie_liczb_i_wyrazow.cpp
#include <iostream> #include <cctype> using namespace std; int main(){ string wczyt; while(getline(cin, wczyt)){ int slowa=0; int liczby=0; if(isalpha(wczyt[0])) slowa++; else liczby++; for(int i=1; i<wczyt.length()-1; i++){ if(isspace(wczyt[i])){ ...
ALGO
0.991343
3.563122
7fdc7ba1-e565-44d6-97a1-f867ad6726c9
Ishwar-Sanap/DSA-Practice
Arrays/Easy/sort_0_1_2.cpp
#include <bits/stdc++.h> using namespace std; // https://leetcode.com/problems/sort-colors/ /* Input: nums = [2,0,2,1,1,0] Output: [0,0,1,1,2,2] */ void sortColors(vector<int> &nums) { int n = nums.size(); // Three-Way Partitioning Algorithm int i = 0, ptr0 = 0, ptr2 = n - 1; while (i <= ptr2) { ...
ALGO
0.999719
5.971169
ef239b86-a635-48e9-9486-5e6fccbcf673
PrajaktaSathe/CPP
algorithms/searching and sorting/MergeSort/Code.cpp
#Merge Sort #include<iostream> using namespace std; void swapping(int &a, int &b) { //swap the content of a and b int temp; temp = a; a = b; b = temp; } void display(int *array, int size) { for(int i = 0; i<size; i++) cout << array[i] << " "; cout << endl; } void merge(int *array, int l, in...
ALGO
0.999996
4.556302
62037e2c-cb87-48fa-82e6-19589f6086f8
amish0301/DSA-Codes
222 - Count Complete Tree Nodes.cpp
// Using Traversal Approach Iterative // T.C = O(N) , S.C = O(N) class Solution { private: int solve(TreeNode* &root , int cnt) { queue<TreeNode*> q; q.push(root); while(!q.empty()) { int sz = q.size(); cnt += sz; while(sz--) { TreeNode...
ALGO
0.999995
6.736967
23d5f606-31e8-47ad-915d-702f9ed2fa78
ermolaevv/ppc-2024-autumn
tasks/mpi/somov_i_horizontal_scheme/src/ops_mpi.cpp
#include "mpi/somov_i_horizontal_scheme/include/ops_mpi.hpp" #include <algorithm> #include <boost/serialization/array.hpp> #include <boost/serialization/vector.hpp> #include <functional> #include <iostream> #include <limits> #include <numeric> #include <vector> void somov_i_horizontal_scheme::distribute_matrix_rows(i...
ALGO
0.998451
5.225935
5a4173f7-9237-4ade-b142-a868b1e5ffee
raomilind04/cf
A_Insomnia_cure.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int k, l, m, n, d; cin>> k >>l >> m>> n>> d; int count= 0; for(int i= 1; i<= d; i++){ if(i%k== 0){ count++; }else if(i%l== 0){ count++; }else if(i%m== 0){ count++; }else ...
ALGO
0.999829
3.650255
2941f3a3-7cb1-4248-ba58-09ff849b50c4
emmacneil/aoc2021
19-beacons/part1.cpp
#include "geometry.hpp" #include <assert.h> #include <chrono> #include <iostream> #include <set> #include <sstream> int main(int argc, char *argv[]) { std::chrono::system_clock::time_point t0 = std::chrono::system_clock::now(); std::vector<std::vector<triple>> solved_scanners, unsolved_scanners; // Get ...
ALGO
0.994696
4.992586
fb120f06-80f8-42a2-8a0a-c6950222803f
HongqiangWei/earthenterprise
earth_enterprise/src/fusion/portableglobe/portableglobebuilder.cpp
// Methods for pruning away all quadtree nodes that are not at or below // the given default level or encompassing the given set of // quadtree nodes. #include "fusion/portableglobe/portableglobebuilder.h" #include <notify.h> #include <algorithm> #include <fstream> // NOLINT(readability/streams) #include <iostream> ...
ALGO
0.974375
6.540254
151ef740-0b0e-4865-a66d-257238382a22
raincross7/code-similarity
codes/train_code/problem119/problem119_440.cpp
#include <bits/stdc++.h> using namespace std ; string s,t ; int solve(int pos) { int ans = 0 ; for(int i = 0;i < t.length(); ++ i) { if(s[pos + i] != t[i]) { ++ ans ; } } return ans ; } int main() { int64_t D, T, S ; ios::sync_with_stdio(false) ; while(cin >> s ...
ALGO
0.999983
4.153242
6c3803ca-24c8-414f-9781-b4f99bc709c2
x-tools-author/siyiqgroundcontrol
libs/eigen/unsupported/doc/examples/MatrixExponential.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); MatrixXd A(3,3); A << 0, -pi/4, 0, pi/4, 0, 0, 0, 0, 0; std::cout << "The matrix A is:\n" << A << "\n\n"; std::cout << "The matrix exponential ...
ALGO
0.999716
3.706936
425b1189-59a2-4722-9520-0423acd28c73
cwida/duckpgq-extension
src/core/functions/table/pagerank.cpp
#include "duckpgq/core/functions/table/pagerank.hpp" #include "duckdb/function/table_function.hpp" #include "duckdb/parser/tableref/subqueryref.hpp" #include <duckpgq/core/functions/table.hpp> #include <duckpgq/core/utils/duckpgq_utils.hpp> #include "duckdb/parser/tableref/basetableref.hpp" namespace duckdb { // Mai...
TOOL
0.942411
6.382973
8ca8637a-bfba-4442-83a2-43cccbd57cfd
adwait1-g/Data-Structures-and-Algorithms
gforg/greedy/max_sum.cpp
//Link: https://www.geeksforgeeks.org/maximize-sum-arrii/ #include<bits/stdc++.h> using namespace std; long long find_arr_sum(vector<long long>& v , long long n); int main() { long long n, temp, max_sum = INT_MIN, sum; cout<<"Enter n: "; cin>>n; vector<long long> v; for(long long i = 0; i < n; i++) { cin>...
ALGO
0.999911
4.751093
8f106dc8-51f8-4252-b10d-4a688bf8d111
ninad-moree/DataStructuresAlgorithms
Arrays/2966-DivideArrayIntoArraysWithMaxDifference.cpp
/* You are given an integer array nums of size n and a positive integer k. Divide the array into one or more arrays of size 3 satisfying the following conditions: Each element of nums should be in exactly one array. The difference between any two elements in one array is less than or equal to k. Ret...
ALGO
0.999964
5.734604
2bc7c9a1-55a1-4f0d-99fd-075321d10549
rockersabbir/UVa-solves
11984.cpp
#include<bits/stdc++.h> using namespace std; int main(){ float f ,c; int i,cunt=1,n; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%f %f",&c,&f); f=(f*5)/9; f=f+c; printf("Case %d: %.2f\n",cunt,f); cunt++; } return 0; }
ALGO
0.998128
3.357181
88f85f70-c753-497f-b907-7c75377c8367
L1MOJ/C-HW
AP1400-2-HW2/src/server.cpp
#include "server.h" #include <algorithm> #include <iterator> #include <map> #include <string> #include <random> #include <regex> using std::runtime_error; /* class Server { public: Server(); std::shared_ptr<Client> add_client(std::string id); std::shared_ptr<Client> get_client(std::string id); double get_wallet(st...
WEB
0.949332
4.837615
5be73251-8e2c-45c9-a10f-b11f18287760
julesep3/Prog2-CPP-Work
HW2/quickSort - Copy.cpp
/* Julian Shen Programming II Due: 1 / 29 / 2020 Sorting Program Bubble Sort, Shell Sort, Quick Sort, and a Main Program */ #include <iostream> using namespace std; int qCost = 0; int partition(int ar[], int l, int r) { while (l < r) { while ((l < r) && (ar[l] <= ar[r])) { r--; qCost += 1; } swap(ar[...
ALGO
0.999627
5.01033
b3081460-5442-4626-ad04-ef4e19babc1a
nakib1948/Competitive-programming
A_Is_your_horseshoe_on_the_other_hoof_.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define rep(i,n) for(i=0;i<n;i++) #define pb push_back #define mp make_pair #define ff first #define ss second #define debug cout<<"debug"<<endl; int main() { ///"In the name of Allah,most gracious and most merciful"/// ll i,j,x,y,z,coun...
ALGO
0.999128
3.29348
082a171c-9bfe-4754-a5aa-187136f9c84f
SJMA11723/Problem-solving
codeforces/Codeforces Round 677 (Div. 3)/C.cpp
/** * Author: Jorge Raul Tzab Lopez * Github: https://github.com/SJMA11723 */ #include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while(t--){ int n; cin >> n; int arr[n], maxi = INT_MIN; for(int ...
ALGO
0.999847
4.529022
d47feb87-9161-49c7-a8d0-4a7ed202cbf6
avinashw50w/ds_algo
Leetcode/227. Basic Calculator II.cpp
/*Given a string s which represents an expression, evaluate this expression and return its value. The integer division should truncate toward zero. Example 1: Input: s = "3+2*2" Output: 7 Example 2: Input: s = " 3/2 " Output: 1 Example 3: Input: s = " 3+5 / 2 " Output: 5 We store operators and operands with two ...
ALGO
0.999932
5.967446
0cf49924-6477-4fce-b1f7-15fe4a540746
rysh25/atcoder
abc326/d.cpp
#include <iostream> #include <iomanip> #include <sstream> #include <list> #include <utility> #include <string> #include <bitset> #include <cstdio> #include <cmath> #include <ctime> #include <climits> #include <cstring> // #include <cstdlib> #include <limits> #include <algorithm> #include <functional> #include <vector> ...
ALGO
0.999832
4.493735
4467e2a7-3c9c-4ca0-af20-fa47bab354f7
jassBawa/DSA-in-CPP
Linked List/delete.cpp
// Inserting linked list, deletion in linked list #include<iostream> using namespace std; class node{ private: int size; public: int data; node* next; node(int val){ data = val; next = NULL; } }; void display(node* head){ node* temp = head; ...
ALGO
0.999329
4.00966
e2e3d020-ac79-4df2-abb2-34dd2ea3bbd6
JohnVlBetter/LeetCode
70.爬楼梯.cpp
/* * @lc app=leetcode.cn id=70 lang=cpp * * [70] 爬楼梯 */ // @lc code=start class Solution { public: int climbStairs(int n) { if(n==0)return 0; if(n==1)return 1; if(n==2)return 2; int a = 1,b=2; for(int i = 3;i<=n;++i){ int c = a + b; a = b; ...
ALGO
0.999909
5.833617
13c808d8-d902-4eeb-9d56-efecbad8a050
Himanshu-pant2005/basic-codes
C++/C_F.cpp
#include <iostream> #include <iomanip> // For std::setprecision // Function to convert Celsius to Fahrenheit double celsius_to_fahrenheit(double celsius) { return (celsius * 9/5) + 32; } int main() { double celsius, fahrenheit; // Input: Enter temperature in Celsius std::cout << "Enter temperature in...
TOOL
0.970286
6.198928
6ff0cf48-cc54-45ac-aa76-5882e748ca45
npinto/opencv
modules/stitching/src/autocalib.cpp
#include "precomp.hpp" using namespace std; using namespace cv; namespace { template<typename _Tp> static inline bool decomposeCholesky(_Tp* A, size_t astep, int m) { if (!Cholesky(A, astep, m, 0, 0, 0)) return false; astep /= sizeof(A[0]); for (int i = 0; i < m; ++i) A[i*astep + i] = (_T...
ALGO
0.999704
6.309432
e0b39b1a-2eab-439c-91cf-b45f05d73a67
thegamer1907/Code_Analysis
Codes/AC/1606.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f; const int N = 100005; int n, s; ll a[N], tmp[N]; ll calc(int x) { for(int i = 1; i <= n; ++i) tmp[i] = a[i] + i * x; sort(tmp + 1, tmp + n + 1); ll sum = 0; for(int i = 1; i <= x; ++i) ...
ALGO
0.999966
3.825857
8c5b7e46-6f9b-47dc-b814-8cd9f9021f5c
mrdinesh-kushwaha/DSA
DSA'24/Practice/call_by_reference.cpp
#include<iostream> #include<vector> using namespace std; void insert(vector<int> &arr) { //arr[4]=5; arr.push_back(5); } int main(){ // int arr[5]={1,2,3,4}; vector<int>arr{1,2,3,4}; for(auto i:arr) cout<<i<<" "; insert(arr); cout<<endl; for(auto i:arr) cout<<i<<" "; ...
ALGO
0.99428
3.621613
2674e224-547e-4715-8ef2-0617a4f19a91
wenqing-2021/Leetcode_practice
BinaryTree/offer68_二叉搜索树的最近公共祖先.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ #include <iostream> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNod...
ALGO
0.999998
5.999454
46709498-e382-41dc-a39c-e6ff36f035c9
wucy/gptk
src/design/GreedyMaxMinDesign.cpp
#include "GreedyMaxMinDesign.h" GreedyMaxMinDesign::GreedyMaxMinDesign(double _zweight) { zweight = _zweight; } GreedyMaxMinDesign::~GreedyMaxMinDesign() { } /** * * */ ivec GreedyMaxMinDesign::subsample(mat X, int n) { if (n <= 0) cerr << "Invalid sample size in GreedyMaxMinDesign::s...
ALGO
0.99939
5.692132
bf97c809-7649-4a24-a8a0-2080f8e1b62d
simonmcqueen/llvm-libcxx
libcxx/test/libcxx/fuzzing/pop_heap.pass.cpp
// UNSUPPORTED: c++03, c++11 #include <algorithm> #include <cstddef> #include <cstdint> #include <vector> #include "fuzz.h" extern "C" int LLVMFuzzerTestOneInput(const std::uint8_t *data, std::size_t size) { if (size < 2) return 0; std::vector<std::uint8_t> working(data, data + size); std::make_h...
TEST
0.950187
4.615525
12b1f0cb-6b42-4220-8f12-2b6405620c89
maurifk/LeetCode
Cpp_LeetCode/1466_ReorderRoutesToAllLeadToZero_DFS.cpp
#include <vector> #include <cmath> using namespace std; class Solution { public: int dfs(vector<vector<int>> &g, vector<bool> &vis, int u){ int darV = 0; vis[u] = true; for (auto v : g[u]) if (!vis[abs(v)]) darV += dfs(g,vis,abs(v)) + (v > 0); return darV; } int minReorder(int n, vect...
ALGO
0.999878
5.167096
e7d98b8d-e3bf-45f3-8470-c51f2ad2a78a
m0Nesyyyyyy/bustub-private
src/execution/sort_executor.cpp
#include "execution/executors/sort_executor.h" namespace bustub { /** * Construct a new SortExecutor instance. * @param exec_ctx The executor context * @param plan The sort plan to be executed */ SortExecutor::SortExecutor(ExecutorContext *exec_ctx, const SortPlanNode *plan, std::unique...
ALGO
0.948859
6.430279
52c7fa1b-be54-4e15-aa84-ae22b511138f
Chribela/Self_Driving_car
project_10_MPC_control/src/Eigen-3.3/doc/examples/DenseBase_middleCols_int.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(1..3,:) =\n" << A.middleCols(1,3) << endl; return 0; }
ALGO
0.900603
3.133398
28d200b0-80ae-4b53-a4b9-02a792c8d38a
Dkishore1404/operating-systems
sstf.cpp
#include<math.h> #include<stdio.h> #include<stdlib.h> int main() { int i,n,k,req[50],mov=0,cp,index[50],min,a[50],j=0,mini,cp1; printf("enter the current position\n"); scanf("%d",&cp); printf("enter the number of requests\n"); scanf("%d",&n); cp1=cp; printf("enter the request order\n"); ...
ALGO
0.999992
3.120364
ad9c65b1-32a6-4d5c-b6fa-d76c3af9ec91
dcode2004/TLE_CP-31_Sheet
C_Scoring_Subsequences.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define f(i, s, e) for (int i = s; i < e; i++) #define fi(i, s, e) for (int i = s; i <= e; i++) #define pii pair<int, int> #define vi vector<int> #define vpii vector<pair<int, int>> #define mii map<int, int> #define umii unordered_map<int, int> #defin...
ALGO
0.999897
4.339645
7a0da21a-5540-4119-8e7a-9b768f4548ec
FelipeBrizola/entretenimento-digital
lib/Box2D-2.3.0/include/Box2D/Collision/b2DynamicTree.cpp
#include <Box2D/Collision/b2DynamicTree.h> #include <memory.h> b2DynamicTree::b2DynamicTree() { m_root = b2_nullNode; m_nodeCapacity = 16; m_nodeCount = 0; m_nodes = (b2TreeNode*)b2Alloc(m_nodeCapacity * sizeof(b2TreeNode)); memset(m_nodes, 0, m_nodeCapacity * sizeof(b2TreeNode)); // Build a linked list for th...
ALGO
0.993997
7.802995
e6ba1987-14f2-45e1-bfbf-82de2ec46c54
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_2453_12.cpp
#include <bits/stdc++.h> using namespace std; int main() { int b = -1; vector<string> week; week.push_back("monday"); week.push_back("tuesday"); week.push_back("wednesday"); week.push_back("thursday"); week.push_back("friday"); week.push_back("saturday"); week.push_back("sunday"); string str1, str2;...
ALGO
0.999996
3.756486
13a5c924-d09c-43bd-a88a-82b66ef3d887
tfcp68/manual-projects
Исходники/Глава 2. Часть 2/Динамическое программирование2/На множествах/6. Компьютерные сети/C++/Олимпиадный/Networks.cpp
#include<vector> #include <iostream> int count_computers(std::vector<std::vector<int>> graph, int size_graph) { int node_from_set = 0; std::vector<int> sets(1 << size_graph, 0); // for (int set = 1; set < (1 << size_graph); set++) { // for (int node = 0; node < size_graph; node++) { ...
ALGO
0.999949
5.32817
4d413cab-8ed0-4e5d-a1b3-3c695550309b
ruddropust/Competitive-Programming
1800A.IsItaCat.cpp
#include<bits/stdc++.h> #define ll long long #define pb push_back #define fr(a,b) for(int i = a; i < b; i++) #define rfr(a,b) for(int i = b-1; i>=0; i--) #define rep(i,a,b) for(int i = a; i < b; i++) #define mod 1000000007 #define inf (1LL<<60) #define all(x) (x).begin(), (x).end() #define prDouble(x) cout << fixed << ...
ALGO
0.99987
4.143202
b0345077-2159-453c-a92c-f29b5aa83844
yash13902/leetcodes
Bottom View of Binary Tree - GFG/bottom-view-of-binary-tree.cpp
//{ Driver Code Starts #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; temp->left = NULL; ...
ALGO
0.999821
6.500103
49c3ffd0-d72d-467c-b810-7554c679e150
ywyue/FiT3D
mmcv/mmcv/ops/csrc/pytorch/convex_iou.cpp
void convex_iou_impl(const Tensor pointsets, const Tensor polygons, Tensor ious) { DISPATCH_DEVICE_IMPL(convex_iou_impl, pointsets, polygons, ious); } void convex_iou(const Tensor pointsets, const Tensor polygons, Tensor ious) { convex_iou_impl(pointsets, polygons, ious); } void convex_giou_i...
ALGO
0.987218
5.404583
c0ecaa7d-3db2-42a0-aa69-a28af50264d3
EthanYang04/simulation
C-source/soft_sd_c2.cpp
/* This function implements a soft output sphere decoder. Based on the paper: C. Studer, M. Wenk, A. Burg, and H. Blcskei: "Soft-Output Sphere Decoding: Performance and Implementation Aspects", Asilomar 2006 R ... is an upper triangular matrix obtained from the QR decomposition of the MIMO channel H s...
ALGO
0.999975
5.120987
0468910a-b3fd-4a3e-9b75-12b57224963a
jimgao1/competitive-programming
DMOPC/dmpg15s4.cpp
#include <bits/stdc++.h> #define MAXN 501 #define pii pair<int, int> using namespace std; int N, Q, rad[MAXN]; bool visited[MAXN]; vector<pair<int, int>> points; double dist(int i, int j){ double dx = points[i].first - points[j].first; double dy = points[i].second - points[j].second; return sqrt(dx * d...
ALGO
0.999987
4.462587
5fe57595-f11b-4af5-89aa-abf867bebb9a
disha01/-algorithm_practicals_bsc-
insertionsort.cpp
//insertion sort #include<iostream.h> int main() { int i,j,n,temp,a[30],count=0; cout<<"Enter the number of elements:"; cin>>n; cout<<"\nEnter the elements\n"; for(i=0;i<n;i++) { cin>>a[i]; } for(i=1;i<=n-1;i++) { temp=a[i]; j=i-1; while((temp<a[j])...
ALGO
0.999908
3.863109
5fe40429-6444-4227-bd1b-2205424a5691
ALEX5402/UnrealEngine-4.26.0-release
Engine/Source/ThirdParty/ICU/icu4c-64_1/source/layoutex/LXUtilities.cpp
#include "layout/LETypes.h" #include "LXUtilities.h" U_NAMESPACE_BEGIN // // Finds the high bit by binary searching // through the bits in n. // le_int8 LXUtilities::highBit(le_int32 value) { if (value <= 0) { return -32; } le_int8 bit = 0; if (value >= 1 << 16) { value >>= 16; ...
TOOL
0.975851
5.889595
eda51843-7f7d-43c9-b844-8246a7184cbe
narwal1996/Hackerrank
the-longest-common-subsequence.cpp
/* Given two sequence of integers, A and B, find any one longest common subsequence. */ #include <bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int s[n], t[m]; for(int i=0; i<n; i++) cin>>s[i]; for(int i=0; i<m; i++) cin>>t[i]; int dp[m+1][n+1]; for(int i=0; i<=m;...
ALGO
0.999997
3.819113
753e83dc-f02c-4d5a-97c6-34d8ed6d93c3
tsxc-github/knowledge-base
docs/Learning Notes/code/p1305.cpp
#include<iostream> #include<cstdio> #include<iomanip> #include<algorithm> #include<cstring> #include<stack> #include<math.h> #include<cctype> #include<map> #include<queue> #include<vector> #define LL long long #define LD long double #define US unsigned short using namespace std; #define MAX 100 #ifdef ONLINE_JUDGE #def...
ALGO
0.999905
3.48248
0cbf76d9-8195-41eb-a474-7be35950ed3d
liulin2012/myLeetcode
PermutationSequence.cpp
class Solution { public: string getPermutation(int n, int k) { int sum = 1; int a = n; while (a != 0) {sum *= a; a--;} vector<int> index(n + 1, 0); index[0] = 1; return Permu(n, k, index, sum); } string Permu(int n, int k, vector<int> index, int sum) { ...
ALGO
0.999992
6.449399
885720ba-e9b5-4f04-b77a-3078ecbddf2e
AbuJubair7/CP
Platforms/LightOJ/agent-47.cpp
/** * author: jubair7 * created: 15.08.2024 15:12:58 **/ #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 42 #endif int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int tt; cin >> tt; int tCase = 0; while (tt--) { int n...
ALGO
0.999981
4.451962
0e3a89cc-febb-47e1-80bb-4bd28c039c82
Ramanathan267/DSA0112--C-
sum of n numbers.cpp
#include <iostream> using namespace std; int main() { int n, num, sum = 0; cout << "Enter the value of n: "; cin >> n; cout << "Enter the numbers: "; for (int i = 0; i < n; i++) { cin >> num; sum += num; } cout << "The sum of the numbers is: " << sum; return 0;...
ALGO
0.99259
3.868036
95b834bc-ce1a-403f-bcf8-88a7fbf61eb9
hamtol2/Wanted_ArenaBattle
Source/ArenaBattle/AI/BTTask_FindPatrolPos.cpp
#include "AI/BTTask_FindPatrolPos.h" #include "ABAI.h" #include "AIController.h" #include "NavigationSystem.h" #include "BehaviorTree/BlackboardComponent.h" #include "Interface/ABCharacterAIInterface.h" UBTTask_FindPatrolPos::UBTTask_FindPatrolPos() { } EBTNodeResult::Type UBTTask_FindPatrolPos::ExecuteTask(UBehavior...
TOOL
0.961319
4.710063
ebce2368-ba85-4015-a763-361fab37121b
Agniv25/CSES-Problem_set
Introductory Problems/repeatition.cpp
#include <bits/stdc++.h> using namespace std; void solve(string s){ int n=s.length(); if(n==1){ cout<<'1'<<endl; return; } int i=1; int cnt=1; int ans=1; while(i<n){ while(s[i]==s[i-1]){ cnt++; i++; } ans=max(ans,cnt); c...
ALGO
0.999945
3.969232
e58e768e-2324-4cf7-acb3-99132117d7fc
tyq-1112/leetcode_note
101-200/101. Symmetric Tree.cpp
#include <bits/stdc++.h> using namespace std; /** * 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...
ALGO
0.999953
6.379946
6f9b2ad2-9bf0-40fe-bb5b-519a152512b4
mdsaniulbasirsaz/Problem-solving
Easy_Sequence_1.cpp
/* Md Saniul Basir Saz Department Of Computer Science and Engineering Jashore University Of Scinece and Technology Student Id: 200103 Email: <EMAIL> Mobile: 01306032236 */ #include<iostream> #include<cmath> #include<algorithm> #include<vector> #include<set> #include<queue> #include<bits/stdc++.h> #in...
ALGO
0.999894
4.555719
c572c8b5-9bbe-4866-aa3c-7f62ecc63616
JinaKong/Baekjoon
SWEA/D2/1859. 백만 장자 프로젝트/백만 장자 프로젝트.cpp
#include<iostream> #include<vector> using namespace std; int main(int argc, char** argv) { int test_case; int T; cin>>T; // 각 테케 for(test_case = 1; test_case <= T; ++test_case) { long long ans = 0; vector<int> prices; // 테케 내에서 N일동안의 매매가 입력받기 prices.clear(); // 벡터 비...
ALGO
0.99945
4.177511