uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
7a7fcd58-67e5-498a-b535-c6c58ee35460
SkullStickyRice/UIUC-CS225-Data-Structure-
lab_graphs/graph_tools.cpp
/** * @file graph_tools.cpp * This is where you will implement several functions that operate on graphs. * Be sure to thoroughly read the comments above each function, as they give * hints and instructions on how to solve the problems. */ #include "graph_tools.h" /** * Finds the minimum edge weight in the Grap...
ALGO
0.999395
4.914769
4679b2b3-61bb-4b55-88fa-5171b514a486
HauPham-Wts/Spoj-PTIT
BCFACT.cpp
#include<iostream> using namespace std; long long factorial(int n) { long long ans = 1; for (int i = 1; i <= n; i++) { ans *= i; } return ans; } int main() { int n; do { cin >> n; if (n == 0) { break; } cout << factorial(n) << endl; } while (1); return 0; }
ALGO
0.999841
5.021717
8966bca4-82f2-4a0a-aa46-d53a33ab4f70
thekodidala/LeetCode-CF
0409-longest-palindrome/0409-longest-palindrome.cpp
class Solution { public: int longestPalindrome(string s) { unordered_map<char,int>mp; for(auto a:s){ mp[a]++; } int count=0; for(auto i:mp){ if(i.second%2!=0){ count++; } } int n=s.length(); if(count>...
ALGO
0.999955
5.846154
2d51688f-c2f1-46dd-ba7a-54b5f2cac39f
thezealousfool/Misc-Work
C++/CodeChef/HFCQ3/HFCQ3.cpp
#include <iostream> #include <vector> #define max 100 using namespace std; typedef long long int Int; const Int Mod = (Int)1E9 + 7; Int dp[234][123][123][4]; Int compute(int B, int N, int R, int D) { if(R<=0) { return 1; } if(B==0) { return 0; } Int &val = dp[B][N][R][D]; if(v...
ALGO
0.999711
3.898916
63327226-6b87-4a03-8322-860cb77e0502
krishnenduduttadc/DSA_Master_cpp
BinaryTreeL2/RightView.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) { val = x; left = nullptr; right = nullptr; } }; vector<int> rightView(TreeNode* root) { vector<int> result; if (!...
ALGO
0.999874
6.50333
df437ab4-1100-4884-896c-64c893314f82
saidul-islam98/Codeforces-Codes
GukiZ and Contest.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n+1],b[n+1]; for(int i=1;i<=n;i++){ cin>>a[i]; b[i]=a[i]; } sort(b+1,b+n+1,greater<int>()); for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(a[i]==b[j]){ cout...
ALGO
0.999975
3.300343
b272bfeb-83e5-4bf3-ba7c-a887ff9ff1b7
saniyat-hydra007/Data-Structure-Algorithm-II-Lab-Codes
Lec-5 Greedy/activitySelection.cpp
/** * @Author: Saniyat Mushrat Lamim * @Date: 04-Apr-2021 * @Email: <EMAIL> * @Filename: activitySelection.cpp * @Last modified by: Saniyat Mushrat Lamim * @Last modified time: 04-Apr-2021 */ #include "bits/stdc++.h" using namespace std; #define el "\n" #define F first #define S second #define PI 3.141592...
ALGO
0.999915
3.852361
41802dc4-96f4-4ab4-a059-3244f6f34664
brian8181/SecureStorage
SHAConsoleApplication/sha1/shatest.cpp
#include <iostream> #include "sha1.h" using namespace std; /* * Define patterns for testing */ #define TESTA "abc" #define TESTB "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" /* * Function prototype */ void DisplayMessageDigest(unsigned *message_digest); /* * main * * Description: * ...
TEST
0.860091
6.637533
143c4658-3960-4fa4-942f-cf305b762ccf
jash459/DSA-BUSTED
Find Minimum Diameter After Merging Two Trees.cpp
class Solution { private: void build(vector<vector<int>>& adj, vector<vector<int>>& edges, int n){ for(auto it: edges){ adj[it[0]].push_back(it[1]); adj[it[1]].push_back(it[0]); } } void get(pair<int, int>& p, vector<vector<int>>& adj, int node, int dis, vector<int>& ...
ALGO
0.999842
5.584382
47ac1749-a578-4a80-b01e-264a8811e173
ttamx/Competitive-Programming
oj.uz/IOI23_deliveries/cpp/deliveries.cpp
#include "deliveries.h" #include <bits/stdc++.h> using namespace std; using ll = long long; const int N=1e5+5; const int K=1<<18; int n; vector<pair<int,int>> adj[N]; int sz[N],hv[N],head[N],tail[N],par[N],tin[N],tout[N],ord[N]; ll w[N],dist[N],val[N]; set<pair<ll,int>> ch[N]; int timer; ll tot,ans; struct Fenwick...
ALGO
0.999743
4.119266
dd0374e3-09a7-4199-bc06-b90329f829cc
kks1177/Study
C_CPP/CPP_BIT/Chapter02/p 1-26.cpp
// p 1-26.cpp 포인터(2) // 포인터를 사용하여 배열을 다루는 프로그램 #include <iostream> using namespace std; int main(void) { int arr[6] = { 1, 2, 3, 4, 5, 6 }; int* parr = arr; int i = 0; cout << "arr의 값 = " << arr << endl; cout << "parr의 값 = " << parr << endl; cout << "&arr[0]의 값 = " << &arr[0] << endl; for (i = 0; i < 6; i++)...
TOOL
0.867648
3.303587
e331441d-2eee-4180-928d-d429aa3f96b9
aghamarsh8/code
Challenge/Week2/RemoveElement27.cpp
/** * @file RemoveElement27.cpp * @author Aghamarsh Varanasi * @brief Solution for the following problem in Leet code as part of Top Interview 150 - Study Plan * 27. Remove Element * https://leetcode.com/problems/remove-element/description/?envType=study-plan-v2&envId=top-interview-150 * * @version 1.0 * @date...
ALGO
0.999734
6.313564
ddea1fc4-8736-4be8-8ed8-57823dec8538
huythedev/Code_archive
SCHOOL/CONTEST_TUAN_09/NBK_NQHUY/CANDIA.cpp
// Author: huythedev (https://huythedev.com) // Problem Link: #include <bits/stdc++.h> using namespace std; #define NAME "CANDIA" #define ln "\n" #define sz size() typedef long long ll; typedef long double ld; void fastio() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } void docf...
ALGO
0.999964
3.735693
2ecc2942-68c4-4fd1-834a-22d29ee1998e
Hasil-Sharma/leet-code
guess-number-higher-or-lower.cpp
// https://leetcode.com/problems/guess-number-higher-or-lower/description/ // Forward declaration of guess API. // @param num, your guess // @return -1 if my number is lower, 1 if my number is higher, otherwise return 0 int guess(int num); class Solution { public: int guessNumber(int n) { long low = 1, hi...
ALGO
0.999995
6.375176
9f6ff6eb-62a8-432d-8d5f-61a3a62a2a28
Nih1tGupta/Leetcode-GFG
0263-ugly-number/0263-ugly-number.cpp
class Solution { public: bool isUgly(int n) { if( n==0) {return false;} while(n%2==0){n=n/2;} while(n%3==0){n=n/3;} while(n%5==0){n=n/5;} return n==1; } };
ALGO
0.999949
5.84886
ae04779a-38c5-4d1a-809c-65cb94ea0e5f
rachit-singhal12/Leetcode-problems
Square root of a number - GFG/square-root-of-a-number.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends // Function to find square root // x: element to find square root class Solution{ public: long long int floorSqrt(long long int x) { return sqrt(x); } }; //{ Driver Code Starts. int main() { int t; ci...
ALGO
0.999919
5.173381
29bbfa0c-6bdb-41d1-9749-072cc34d22ff
maxjoehnk/contact-manager
Source/frontend/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.998064
6.76073
2202e03b-6de7-4aaf-8d70-6b8746260590
wsjdsg/BUAASEPairProg
T3/t3_1_cpp/mancalaBoard.cpp
#include <iostream> #include <cstdlib> // #include <emscripten/emscripten.h> using namespace std; #ifdef __cplusplus extern "C" { #endif int over(int*a){ bool flag=true; for(int i=0;i<6;i++) if(a[i]) {flag=false;break;} if(flag) return 1; flag=true; for(int i=7;i<13;i++) if(a[i]) {flag=false;break;}...
ALGO
0.99722
3.080769
6d509493-2b46-4db3-bca6-bb1c324c661e
edwardocano/Sandsara
src/Calibration.cpp
#include "Calibration.h" hw_timer_t *timer1 = NULL; MeanFilter<long> meanFilter(5); MeanFilter<long> meanFilter2(40); MeanFilter<long> meanFilter3(10); MeanFilter<long> meanFilter4(10); int flag = 0; int avoid = 0; int avoid2 = 0; int A = 0; int B = 0; byte L; byte H; int p = 0; int motor_degrees = 0; int Speed = 50...
TOOL
0.929992
3.331163
89805f4a-19c0-4ffb-a290-9d5fa7b03b55
kmjp/procon
codeforce/edu/121-160/152/f.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #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 FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999853
3.748811
7be860ca-6f67-4f80-b8a5-91641080d109
raincross7/code-similarity
codes/train_code/problem206/problem206_488.cpp
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; if(x < 1200){ cout << "ABC" << endl; } else if(x >= 1200){ cout << "ARC" << endl; } }
ALGO
0.992923
4.032539
6ee03174-c2a4-491a-a76f-03edc79991c1
johnime/esphome
esphome/components/kalman_combinator/kalman_combinator.cpp
#include "kalman_combinator.h" #include "esphome/core/hal.h" #include <cmath> #include <functional> namespace esphome { namespace kalman_combinator { void KalmanCombinatorComponent::dump_config() { ESP_LOGCONFIG("kalman_combinator", "Kalman Combinator:"); ESP_LOGCONFIG("kalman_combinator", " Update variance: %f ...
ALGO
0.924381
7.292641
5fd8d9ae-9921-49cd-b3f5-421c85f51522
yliu-cs/ACM
PTA/第四届“中国高校计算机大赛-团体程序设计天梯赛”模拟赛/1-4.cpp
#include <bits/stdc++.h> int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); std::cout.tie(0); int n; std::cin >> n; for (int i = 0; i < n; ++i) { std::string name; int a, b; std::cin >> name >> a >> b; if (a >= 15 && a <= 20 && b >= 50 && b <= 70) continue; std::cout << name << '\...
ALGO
0.97103
3.346986
ffedb143-ed77-495a-9e33-a9530dccf4c9
ashokabairwaideology/Leet-code-problem
solution/0400-0499/0494.Target Sum/Solution.cpp
class Solution { public: int findTargetSumWays(vector<int>& nums, int target) { int s = accumulate(nums.begin(), nums.end(), 0); if (s < target || (s - target) % 2) { return 0; } int m = nums.size(); int n = (s - target) / 2; int f[m + 1][n + 1]; m...
ALGO
0.999994
6.085224
9b3b70d3-9ac6-478c-8af3-2356bba7beb9
gidelfino/maratona
timus/1022.cpp
#include <bits/stdc++.h> using namespace std; #define fst first #define snd second typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; #define pb push_back #define for_tests(t, tt) int t; scanf("%d", &t); for(int tt = 1; tt <= t; tt++) template<typename T> inline T abs(T t) { return t < 0?...
ALGO
0.999933
3.705322
8b0ab3a4-4384-4b04-bcfd-6653576ffae4
MuHe03/AdventsOfCode2023
day1/code.cpp
#include <bits/stdc++.h> using namespace std; void task1(vector<string> str) { int sum = 0; for (string s : str) { int x = 0, y = 0; for (auto ch : s) if (isdigit(ch)) { x = ch - '0'; break; } reverse(s.begin(), s.end()); f...
ALGO
0.999712
5.531001
0a3399eb-9ea3-492d-ab31-36994cdcae45
chenseanxy/1809-OOP-card-vehicle-system
1/5.9.11.cpp
#include <iostream> #include <stdlib.h> #include <string> using namespace std; #define MAX_TABLE_LEN 1024 #define MAX_WORD_LEN 32 string strings[MAX_TABLE_LEN]; void scan(){ int wordcount=0, i=0; bool taken=false; char word[MAX_WORD_LEN]; while(wordcount<MAX_TABLE_LEN && ~scanf("%s",word)){ ...
TOOL
0.865958
3.686551
7f38b3f9-3b8f-4563-9d65-7e3277eb17dc
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Gemma/top0-100/decode-ways-ii-Solution.numDecodings/177865_DoS.cpp
PatternMatch(char *pat, int patdashes, char *string, int stringdashes) { char c, t; if (stringdashes < patdashes) return 0; for (;;) { switch (c = *pat++) { case '*': if (!(c = *pat++)) return 1; if (c == XK_minus) { patdashes--; for (;;) { while ((t = *strin...
ALGO
0.999607
4.488668
ee3729c8-a022-4c1a-9970-e7963443d4d8
JLospinoso/ccc
chapter_2/listing_2_11.cpp
#include <cstdio> int main() { unsigned long maximum = 0; unsigned long values[] = { 10, 50, 20, 40, 0 }; for(unsigned long value : values) { if(value > maximum) maximum = value; } printf("The maximum value is %lu.", maximum); }
ALGO
0.995152
3.869398
8355ea4f-22fd-41f6-8020-5c4b4d729108
cosmoss-jigu/vip
llvm-project/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
// <forward_list> // template <class Predicate> void remove_if(Predicate pred); #include <forward_list> #include <iterator> #include <cassert> #include <cstddef> #include "min_allocator.h" #include "counting_predicates.hpp" bool g(int i) { return i < 3; } int main(int, char**) { { typedef int T; ...
TEST
0.904492
6.400424
cd4d0c0f-516d-46f4-9368-d28faf42c072
kirsimarianne/cplusplus-course
w2/assignment2_3_1/e3/main.cpp
/* Exercise 3: * Create a vector of floating-point numbers and sort it. * Experiment with different sizes of vectors and number ranges. */ #include <algorithm> #include <iostream> #include <vector> void sort_vector(std::vector<float>& vect) { std::sort(vect.begin(), vect.end()); } /* Function to print vector *...
ALGO
0.999352
5.233646
2e3ad94b-2080-4eb9-a11d-495a09183606
NavonilDas/Algos
LeetCode/4Sum.cpp
class Solution { public: vector<vector<int>> fourSum(vector<int>& ar, int target) { vector<vector<int>> ans; const int n = ar.size(); sort(ar.begin(),ar.end()); for(int i=0;i<n;++i){ if(i > 0 && ar[i] == ar[i-1]) continue; for(int j=i+1;j<n;++j){ ...
ALGO
0.999933
5.988913
9e47f6ec-5e82-4e7f-a003-e2eef3ed3687
Shenjiaqi/sgu
234/234.cpp
#include <algorithm> #include <string> #include <vector> #include <cmath> #include <map> #include <fstream> #include <cassert> #include <set> #include <queue> #include <iostream> #include <utility> #include <stack> #include <complex> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <list> #include <f...
ALGO
0.999875
3.197861
1873b98d-c9c1-4326-8aa1-42bdbdd32783
mkut/aoj
Volume20/2021/c++.cpp
#include <iostream> #include <stdio.h> #include <algorithm> #include <vector> #include <queue> using namespace std; struct node { int city, m; node(int City, int M) : city(City), m(M) {} bool operator<(const node& a) const { return city < a.city || city == a.city && m < a.m; } }; struct state { node n; int...
ALGO
0.999724
3.252358
f8c910ac-91e8-48f9-99d8-88e07af3fd43
jared-hwang/PyPADocker
installation/bempp/lib/space/space_helper.cpp
#include "space_helper.hpp" #include "../common/acc.hpp" #include "../common/boost_make_shared_fwd.hpp" #include "../common/bounding_box_helpers.hpp" #include "../fiber/explicit_instantiation.hpp" #include "../grid/entity.hpp" #include "../grid/entity_iterator.hpp" #include "../grid/geometry.hpp" #include "../grid/gri...
ALGO
0.972093
7.264159
8f25a869-c0a7-4fcc-9ed2-d2faa08c6ceb
crDroid-UL/android_frameworks_native
cmds/lshal/utils.cpp
#include "utils.h" namespace android { namespace lshal { std::string toHexString(uint64_t t) { std::ostringstream os; os << std::hex << std::setfill('0') << std::setw(16) << t; return os.str(); } std::vector<std::string> split(const std::string &s, char c) { std::vector<std::string> components{}; ...
TOOL
0.87133
6.185769
b69738c8-b46c-424a-b765-03f5f8efbc22
Amidwar-GH/FP_FUNCIONES_II_MAMANI_GENIX_AMIDWAR
EJERCICIO-04.cpp
/*4. Clculo de Races de una Ecuacin Cuadrtica: Crea un programa que calcule las races de una ecuacin cuadrtica utilizando la frmula general. Utiliza la funcin sqrt de la librera cmath para calcular la raz cuadrada. Solicita al usuario los coeficientes de la ecuacin (a, b, c) y muestra las races obtenidas. Considera ...
ALGO
0.999059
3.587333
153d55cb-ff3b-4d01-936d-c325d6a54a11
SERGIODSA/EjerciciosC
Ejercicios C++/SIMULACR.CPP
#include <conio.h> #include <stdio.h> #define n 4 #define m 5 /* Dada una matriz de N x M determinar: a) mayor numero de dos digitos por fila b) promedio por columna */ void main (){ clrscr(); int i,j,ma[m][n],max; float prom,sum; printf ("Introducir matriz: \n"); for (i=0;i<m;i++){ for (...
ALGO
0.994703
3.796001
3281e225-75ed-4a5b-b99c-11404e0fc6cb
NekoSekaiMoe/zig-bootstrap-ollvm
llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp
#include "llvm/Transforms/Utils/MemoryTaggingSupport.h" #include "llvm/Analysis/CFG.h" #include "llvm/Analysis/PostDominators.h" #include "llvm/Analysis/StackSafetyAnalysis.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/Transforms/Utils/Pro...
TOOL
0.976507
7.064416
91d1a0d1-3fe7-402a-8732-b4b76d282c33
YMDragon/OJ-code
codeforces/605/C.cpp
#include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <cstdio> #include <cmath> using namespace std; typedef long long LL; struct point{int x,y;}a[100010],b[100010]; int n,m,p,q; double ans; bool cmp(point x,point y){return (x.x<y.x )||((x.x==y.x)&&(x.y>y.y));} LL cross(point o,point...
ALGO
0.99985
3.969477
a4044fc2-5d4c-4755-96bf-ea81e4216070
CodeBySushant/SolvedLeetcode
leetcode-main/leetcode-main/solution/3100-3199/3186.Maximum Total Damage With Spell Casting/Solution.cpp
class Solution { public: long long maximumTotalDamage(vector<int>& power) { sort(power.begin(), power.end()); this->power = power; n = power.size(); f.resize(n); nxt.resize(n); for (int i = 0; i < n; ++i) { cnt[power[i]]++; nxt[i] = upper_bound...
ALGO
0.999958
4.887424
7a6b05bc-d437-4f9a-ae78-125b607dd02d
Ouan2551/Leet-code
2.Add_Two_Numbers.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { } }; int main() { ios::sync_with_stdio(0):cin.tie(0);cout.tie(0); return 0; }
ALGO
0.999841
6.12667
8c0cd1f0-fbff-45c2-9fe0-b20d076ac654
arrayfire/arrayfire
examples/image_processing/edge.cpp
#include <arrayfire.h> #include <stdio.h> #include <af/util.h> #include <cstdlib> using namespace af; void prewitt(array &mag, array &dir, const array &in) { static float h1[] = {1, 1, 1}; static float h2[] = {-1, 0, 1}; static array colf(3, 1, h1); static array rowf(3, 1, h2); // Find the gradie...
ALGO
0.993466
6.381978
87f06ca7-2543-4857-b176-24053d150294
roelandjansen/wsjt-x
boost/libs/math/tools/factorial_tables.cpp
#include <boost/limits.hpp> #include <vector> #include "mp_t.hpp" void write_table(unsigned max_exponent) { mp_t max = ldexp(mp_t(1), (int)max_exponent); std::vector<mp_t> factorials; factorials.push_back(1); mp_t f(1); unsigned i = 1; while(f < max) { factorials.push_back(f); ++i; ...
ALGO
0.914218
4.253815
62d9870e-d2a5-4025-8565-7e58c31ae2ae
hugoFranco21/ProgramasISC
4toSem/ADA/atFirst.cpp
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <map> #include <numeric> #include <set> #include <sstream> #include <stack> #include <utility> #include <vector> #define I...
ALGO
0.999925
3.704581
26c8b0f2-334b-4ba0-b130-5320d586bf9d
gnn-benchmark/reordering
reordering/rescience_gorder/src/utils/heap.cpp
#include <vector> #include "heap.h" #include "tools.h" using namespace std; Bheap::Bheap(ul n_max) : n_max(n_max) { n = 0; pt.reserve(n_max); kv.reserve(n_max); } void Bheap::binary_swap(ul i, ul j) { std::swap(pt[ kv[i].key ], pt[ kv[j].key ]); std::swap(kv[i], kv[j]); } ul Bheap::bubble_up(ul child) { whil...
ALGO
0.99928
4.754063
9140086a-39dc-4fdc-88b8-a47973816d3e
sarvex/leetcode-lol-code
solution/0400-0499/0474.Ones and Zeroes/Solution.cpp
class Solution { public: int findMaxForm(vector<string>& strs, int m, int n) { vector<vector<int>> dp(m + 1, vector<int>(n + 1)); for (auto s : strs) { vector<int> t = count(s); for (int i = m; i >= t[0]; --i) for (int j = n; j >= t[1]; --j) ...
ALGO
0.999982
6.372993
ba9187b9-4db5-4a15-b9d8-720cf5faa014
Lanly109/Solution-Markdown-Template-For-Algorithm-Contest
code/cf/contest/1857/f/f.cpp
/* * Author: Lanly * Time: 2023-08-08 16:20:31 */ #include <bits/stdc++.h> using namespace std; using LL = long long; #define FOR(i, x, y) \ for (decay<decltype(y)>::type i = (x), _##i = (y); i < _##i; ++i) #define FORD(i, x, y) ...
ALGO
0.999883
4.735546
ec25cf08-3b06-4057-820e-0c198f5df097
keywet06/code
.oct/twosat.cpp
#include <bits/stdc++.h> #define pub push_back namespace oct { inline void ios() { std::ios::sync_with_stdio(0); std::cin.tie(0), std::cout.tie(0); } template <typename _Tp> inline _Tp &mad(_Tp &x, _Tp y) { return x = std::max(x, y); } template <typename _Tp> inline _Tp &mid(_Tp &x, _Tp y) { return...
ALGO
0.999959
4.142858
b6bb3ade-6c08-4cbb-ab92-ce16bd54a512
Skyplasma/arduino-projects
semester 1/cookbookproject_v3 working.cpp
//int i; int current = 1; int increment = 1; int ledShift = 3; int digit = 1; float difference = 0; int foo2; void setup() { Serial.begin(9600); // Set all pins from 4 to 13 as OUTPUT (LEDs) for (int i = 4; i <= 13; i++) { pinMode(i, OUTPUT); digitalWrite(i, LOW); // Make sure all LEDs are OFF initially...
ALGO
0.996484
4.878543
6270b7d8-20ef-4bf3-bd60-8b9f85447aec
kamal-stark-dev/Learning
LeetCode/138. K-th Element of two sorted arrays.cpp
// K-th Element of two sorted arrays #include <iostream> #include <vector> using namespace std; // Brute - Create a merged array and return its k-th element // Better - Use the two pointer approach to find k-th element // My take before looking at the solution, I was misunderstanding the partition (was thinking it's...
ALGO
0.999992
5.843141
1e5d843a-9375-4c48-85db-6a73705b2ca9
ishandutta2007/codeforces
strawberryc/normal/1329/B.cpp
#include <bits/stdc++.h> template <class T> inline void read(T &res) { res = 0; bool bo = 0; char c; while (((c = getchar()) < '0' || c > '9') && c != '-'); if (c == '-') bo = 1; else res = c - 48; while ((c = getchar()) >= '0' && c <= '9') res = (res << 3) + (res << 1) + (c - 48); if (bo) res = ~res + 1; } co...
ALGO
0.999684
4.016667
2f12ac96-f4b6-40b5-a42b-eca79491754a
shieldai/AdaptiveShielding
src/Environment.cpp
#include <algorithm> #include <iostream> #include <cmath> #include <cassert> #include "Environment.h" Environment::Environment(const std::vector<std::string> &labels, const std::vector<float> &probabilities, const std::vector<int> &weights, co...
ALGO
0.991945
5.658637
00405ea6-4cfa-4fed-bfbf-57b669022991
hack-parthsharma/LeetCode
2748-number-of-beautiful-pairs/2748-number-of-beautiful-pairs.cpp
class Solution { public: int countBeautifulPairs(vector<int>& nums) { int ans = 0; for (int i = 0; i < nums.size(); ++i) for (int j = i + 1; j < nums.size(); ++j) if (__gcd(firstDigit(nums[i]), lastDigit(nums[j])) == 1) ++ans; return ans; } private: int firstDigit(int num)...
ALGO
0.999893
6.167016
d552a5dd-9cba-4071-b402-ec2b919713c7
ishandutta2007/codeforces
ngfam/normal/1285/C.cpp
#include<bits/stdc++.h> using namespace std; long long lcm(long long x, long long y) { return (x / __gcd(x, y)) * y; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); long long n; cin >> n; long long ans = n; for(long long i = 1; i * i <= n; ++i) { if(n % i == 0) { long long j = ...
ALGO
0.999907
5.017931
b6e1bc73-c1ea-4e1b-b60e-24c9b35c5b24
shubhamkumar5051/Prep-100
prep 100/sorting_algo.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; void select_sort(int *arr, int n) { for (int i = 0; i < n - 1; i++) { int mini = i; for (int j = i + 1; j < n; j++) { if (arr[j] < arr[mini]) { mini = j; } } ...
ALGO
0.999884
4.689373
5e7cbbc7-f316-458f-8543-ef64799e6b0c
iwakawa0510/AtcoderSolution
abc395/c/main.cpp
#include <iostream> #include <iomanip> #include <algorithm> #include <cmath> #include <array> #include <string> #include <vector> using namespace std; int main(){ int n; cin >> n; vector <int> a(n); for(auto& x : a)cin >> x; vector<int> cnt(1000005); int m = 0; const int INF = 1001001001;...
ALGO
0.99991
4.224133
b203d633-ef4b-4e1d-82dd-bdd2835ce379
sweta-singh28/DSA
LinkedList/DoublyLL.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node* next; Node* prev; Node(){ this->data = 0; this->prev = NULL; this->next = NULL; } Node(int data){ this->data = data; this->prev = NULL; this->next = NULL; ...
ALGO
0.997933
4.591896
1a91cf52-4446-4d3c-802e-39c43f7734d5
newbie93/Ultimate_Learner
Dynamic_Programming/longest_palindromic_substring_tabular.cpp
#include<bits/stdc++.h> using namespace std; int longest_palindromic_substring(string str) { int len=str.length(),i,gap,max_len=0; bool is_palin[len][len]; for(gap=0;gap<len;gap++) { for(i=0;i<len-gap;i++) { if(str[i]==str[i+gap]) { if(gap>1) ...
ALGO
0.999846
4.976727
c0063981-7006-4723-b140-3cfeeaa2eae4
DvigloTest/Dviglo
Source/Urho3D/Graphics/DecalSet.cpp
#include "../Precompiled.h" #include "../Core/Context.h" #include "../Core/Profiler.h" #include "../Graphics/AnimatedModel.h" #include "../Graphics/Batch.h" #include "../Graphics/Camera.h" #include "../Graphics/DecalSet.h" #include "../Graphics/Geometry.h" #include "../Graphics/Graphics.h" #include "../Graphics/IndexB...
TOOL
0.927981
7.13664
03561510-2620-4a37-9d9d-33a075c4643e
3013216006/ACM
17-7-18/g.cpp
#include <iostream> #include <stdio.h> using namespace std; int n; int main(){ int T; int cas=1; scanf("%d",&T); while(T--){ scanf("%d",&n); long long tmp=1; int ans=0; while(tmp<n){ ans++; n-=tmp; tmp<<=1; } ans++; printf("Case %d: %d\n",cas++,ans); } }
ALGO
0.999866
4.138578
9c57b671-e20c-465e-8d0a-05f372105062
janm31415/chesssouls
libchesssouls/position.cpp
#include "position.h" #include "movegen.h" #include "notation.h" #include "hash.h" #include "eval.h" #include <algorithm> #include <sstream> #include <intrin.h> #include <iomanip> namespace { static const std::string piece_to_char(" PNBRQK pnbrqk"); /* int castle_mask[64] = { 7, 15, 15, 15, 3, 15, 15, 11,...
ALGO
0.983689
5.364868
da6eba61-1b46-4700-9c81-3a577575f0ab
GUVI-Courses/DSA-using-C-
knapsack/main.cpp
#include <iostream> #include <vector> using namespace std; // Function to solve the Knapsack problem int knapsack(int W, vector<int>& weights, vector<int>& profits, int n) { // Create a DP table to store the maximum profit for each weight limit vector<vector<int>> dp(n + 1, vector<int>(W + 1, 0)); // Fill...
ALGO
0.999995
6.481438
39f84aad-c581-46b9-b7c6-2716f8f72bbd
Jatan-Mathasoliya/C-Bootcamp
30.cpp
#include <iostream> using namespace std; int sum (int num){ int odd = 0, even = 0; if(num == 0){ return 0; } else{ while(num !=0){ int n = num % 10; num = num / 10; if(n % 2 == 0){ even += n; } else{ ...
ALGO
0.999713
4.9373
eb655660-f2cf-4c5c-a076-d1e8d68f2280
Husainbw786/GeeksForGeeks
Easy/Check if Tree is Isomorphic/check-if-tree-is-isomorphic.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; struct Node { int data; Node *left; Node *right; Node(int val) { data = val; left = right = NULL; } }; Node* buildTree(string str) { // Corner Case if(str.length() == 0 || str[0] == 'N') retur...
ALGO
0.999744
7.033217
cf6bc0e3-729f-4967-aab1-c35242a2919d
renannigor/Rosalind_Problems
stronghold/code/c++/SUBS.cpp
#include <iostream> #include <string> #include <fstream> #include <vector> class SUBSSolution { private: std::string dna_seq_one, dna_seq_two; std::vector<unsigned> locations; public: SUBSSolution() { read_dna_seq(); check_locations(); } void read_dna_seq() { std::...
ALGO
0.995682
5.034201
3365522c-60ac-472e-8d2a-1c02a76af359
acnq/.leetcode_exercise_repo
88.合并两个有序数组.cpp
/* * @lc app=leetcode.cn id=88 lang=cpp * @lcpr version=21909 * * [88] 合并两个有序数组 */ // @lc code=start #include <vector> using namespace std; class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { int N = nums.size(); int i = 0, j = 0; // doble pointer ...
ALGO
0.999967
6.283815
f0557b1f-56f4-42c4-8ac3-63f2eaa72ecd
CPSC-2380-UALR/CPSC.2380.Code.Examples
Level.6.5.Distance.Between.Nodes/Distance.Between.Nodes.cpp
#include <iostream> #include <queue> using namespace std; struct node { int data; node* left; node* right; }; void insert(node* & root, int data); node* insertRecursive(node*, int); node* search(node*, int); node* breadthFirstSearch(node*); node* remove(node*, int); /*****Balancing a Tree*****/ void storeBSTNodes...
ALGO
0.999964
4.589267
92eae26c-28d1-4965-8aa6-3661701ed03c
dtakahashi333/CodingPuzzlesCpp
src/library_fine.cpp
#include "library_fine.hpp" /* * Complete the 'libraryFine' function below. * * The function is expected to return an INTEGER. * The function accepts following parameters: * 1. INTEGER d1 * 2. INTEGER m1 * 3. INTEGER y1 * 4. INTEGER d2 * 5. INTEGER m2 * 6. INTEGER y2 */ int libraryFine(int d1, int m1...
ALGO
0.995787
4.56151
86e14098-c9ca-491e-bbba-49626cb08f53
koralkulacoglu/CompetitiveProgramming
CodeForces/Contests/780/3/B.cpp
/* ID: Koral Kulacoglu TASK: test LANG: C++ */ #pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; typedef long double lld; typedef complex<ld> cd; typedef pair<int, ...
ALGO
0.998735
4.450786
52ddc862-ed4a-42c2-95cc-858c8f5d5ab4
Metal666-NAU/MMDS
lab2_4/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.998237
6.789978
a38d4cd9-4106-4c7d-86a2-47845e62123c
sikuner/book-code
Learning Boost C++ Libraries/ch04/listing4_01.cpp
#include <string> #include <algorithm> #include <cassert> #include <cctype> int main() { std::string song = "Green-tinted sixties mind"; std::transform(song.begin(), song.end(), song.begin(), ::toupper); assert(song == "GREEN-TINTED SIXTIES MIND"); }
ALGO
0.895336
6.195449
56bc06bb-1978-4d0b-9186-d607a562ff67
hoango277/Data_Structures_Algorithms-PTIT
DSA02003.cpp
// https://code.ptit.edu.vn/student/question/DSA02003 // DI CHUYỂN TRONG MÊ CUNG 1 #include <bits/stdc++.h> using namespace std; int n, a[11][11]; vector<string> v; void Try(int i, int j, string s) { if (i == n && j == n) { v.push_back(s); return; } if (i < n && a[i + 1][j] == 1) ...
ALGO
0.999603
4.599742
06d515cf-2ef3-4275-9d19-317d89f74987
caiweirui/rookies
2025_6_04/Arrange arrays by parity.cpp
/** * Note: The returned array must be malloced, assume caller calls free(). */ int* sortArrayByParity(int* nums, int numsSize, int* returnSize) { int *p1 = nums; int *p2 = nums + numsSize - 1; int temp = 0; *returnSize = numsSize; while(1) { while(p1 < p2 && *p1 % 2 == 0) { ...
ALGO
0.999991
4.980046
ba5cb6f8-cfef-4103-9255-b52674bc800f
sw0501/Baekjoon
Algorithm/Baekjoon/Complete/boj_9012.cpp
#include<iostream> #include<stack> using namespace std; int N; int main(){ cin >> N; for(int j=0;j<N;j++){ stack<int>S; string str; cin >> str; int temp = 1; for(int i=0;i<str.length();i++){ if(str[i]=='(')S.push(i); else { if(S.empty()){ temp=0; break; } else S.pop(); } ...
ALGO
0.999959
4.252224
b86102cc-7ce2-43ec-b9e4-f638bd7b066f
oneskovic/CP-Problems
CodeForces/Round 825/C2.cpp
#include <algorithm> #include <iostream> #include <vector> #include <set> using namespace std; typedef long long ll; #include <vector> #include <algorithm> using namespace std; #define ll long long class SegmentTree { public: SegmentTree(const vector<ll>& elements); void update(int position, ll new_value); ll sum_q...
ALGO
0.99982
4.814334
37690462-1e3e-4d59-b92f-cfdd74f73fcd
gbudiman/gpa4grp1
GPA4/Search.cpp
/* * File: Search.cpp * Author: Wan Kuk * * Created on December 1, 2010, 11:30 PM */ #include "Search.h" #include "CoordCube.h" int Search::ax[31]; int Search::bx[50]; int Search::po[31]; int Search::flip[31]; int Search::twist[31]; int Search::slice[31]; int Search::parity[31]; int Search::URFtoDLF[31]; int...
ALGO
0.999673
3.95042
2b1ec6c3-39b6-4b66-90ba-71bc88d51d40
jacobpark1080/phys240project
Project/packetLR.cpp
#include <cassert> #include <cstdlib> using std::exit; #include <cmath> //#define M_PI 3.14159265358979323846 using std::sqrt; using std::fabs; using std::fmod; using std::pow; #include <limits> using std::numeric_limits; #include <iomanip> using std::setprecision; #include <string> using std::string; #include <c...
ALGO
0.997971
3.407702
333160e6-eaad-446c-a8b8-06136be30aa1
MuraliMallisetty77/Marathon-Files
cpp mini/2/main.cpp
#include<iostream> #include"header.h" #include<cstring> void displayMenu() { std::cout<<"\n\t\tLoan Management System"<<std::endl; std::cout<<"-------------------------------------------"<<std::endl; std::cout<<"\n1.Add record"; std::cout<<"\n2.Show all records"; std::cout<<"\n3.Search record"; ...
TOOL
0.889983
3.47717
2a24c5b8-b9e6-467d-ace2-7416881d7292
natanaso/active_object_detection
planning_module/appl-0.95/src/Simulator/SimulationEngine.cpp
#include <sstream> #include <fstream> #include "SimulationEngine.h" #include "AlphaVectorPolicy.h" #include "CPTimer.h" #include "solverUtils.h" using namespace std; using namespace momdp; namespace momdp { void printTuple(map<string, string> tuple, ofstream* streamOut){ *streamOut << "("; for(map<string, strin...
ALGO
0.997027
5.886908
27e88f46-d37f-45ad-b733-ebccb49034f0
GpsLypy/home
各公司面试题/ALIB/3.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n,K; cin>>n>>K; int a,b,c; unordered_map<int,int> map; pair<int,int> p; vector<vector<int>> res; vector<int> floor(5,0); for(int ii=0;ii<n;ii++){ cin>>a>>b>>c; if(map.find(a)!=map.end()){ if(map[a]...
ALGO
0.999765
3.495587
3ddbbd1d-326f-4d46-b59a-00e549b790cf
WeiHe999/dmoj_cpp_level_2
DMOPC '16 Contest 4 P3 - Carnival Phantasm.cpp
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); cout.tie(0); cin.sync_with_stdio(0); int n, s, q, a, b; char c; cin >> n >> s; unordered_map <int, int> m1; unordered_map <int, unordered_set <int> > m2; for (int i = 1; i <= n; i++) { cin >> a; m1[i]...
ALGO
0.999917
4.099994
845ce581-945c-4ae6-a07d-edd89155ae7e
ishandutta2007/codeforces
faustaadp/normal/1569/A.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define pb push_back #define mp make_pair #define fi first #define se second const ll NN = 2e5 + 5; const ll mo = 1e9 + 7; int main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); ll t; cin >> t; while(...
ALGO
0.999882
3.84034
bac0e100-537d-41af-8ec4-14db6c857940
luisixc/segundo-semestre
Algoritmos/Tareas/Tarea_7/ejercicioNo_4.cpp
#include <iostream> using namespace std; long double factorial(int); int main() { int n; cout << "Introduzca numero: "; cin >> n; cout << "factorial: " << factorial(n) << endl; system("pause"); } long double factorial(int n) { long double fact; if (n==0) return 1; else r...
ALGO
0.995096
3.387306
8bb2d34b-563b-4921-9611-c84cb4062264
pvnsumanth/LeetCode
0162-find-peak-element/0162-find-peak-element.cpp
class Solution { public: int findPeakElement(vector<int>& nums) { int left=0; int right=nums.size()-1; while(left<=right){ int mid=(left+right)/2; if((mid==0 ||nums[mid]>nums[mid-1]) && (mid==nums.size()-1 ||nums[mid]>nums[mid+1])) return mid; else if(mid>...
ALGO
0.999957
5.706216
7c75398f-2b1e-4de4-831e-eb578f6b8b96
ishandutta2007/codeforces
maximumshot/normal/1725/J.cpp
#include <cassert> #include <cstdio> #include <algorithm> /** Fast allocation */ #define FAST_ALLOCATOR_MEMORY 2e8 #ifdef FAST_ALLOCATOR_MEMORY int allocator_pos = 0; char allocator_memory[(int)FAST_ALLOCATOR_MEMORY]; inline void * operator new ( size_t n ) { char *res = allocator_memo...
ALGO
0.999932
4.88051
bbbabfb4-4122-4d36-a685-3c892fbe06c8
ExNilos/Linked-List
Linked List/Source.cpp
#include <iostream> using std::cout; using std::endl; int* myPointer = nullptr; int myNumber1 = 1; int myNumber2 = 2; void AssignPointer1(int& a_number); void AssignPointer2(int a_number); void main() { AssignPointer1(myNumber1); cout << myNumber1 << endl << &myNumber1 << endl << myPointer << endl; AssignPointer2...
TOOL
0.93661
3.360415
88b6c29d-81ca-402c-9921-0d47dc8d9722
shawwn/hon
lib/tbb22_20090809oss/examples/parallel_for/polygon_overlay/polyover.cpp
// Polygon overlay // #include <iostream> #include <algorithm> #include <string.h> #include <cstdlib> #include <assert.h> #include "tbb/tick_count.h" #include "tbb/blocked_range.h" #include "tbb/task_scheduler_init.h" #include "tbb/parallel_for.h" #include "tbb/mutex.h" #include "tbb/spin_mutex.h" #include "polyover.h"...
ALGO
0.990898
4.899868
237d9186-531a-4d14-b342-b81ccb69d7d2
MohammadAbdullah5/Programming-Fundamentals
PF 9/Task 5.cpp
#include <iostream> using namespace std; int arr[100]; main() { int n; cout << "Number of Boxes: "; cin >> n; arr[n*3]; for(int x = 0; x < n*3; x++) { cout << "Enter value for array: "; cin >> arr[x]; } int product = 0; int dimension = 0; for(int x = 0; x < n; ...
ALGO
0.99436
3.908148
572caeba-e379-41ba-a062-4277c480adec
SeymourTeets/Teets_Clayton_CSC5_43952
Hmwk/Assignment_4/Gaddis_7thEd_Chap5_ProgChal_Prob3/main.cpp
/* * File: main.cpp * Author: Clayton Teets * Created on April 10, 2015, 2:51 PM * Purpose: Distance Traveled */ //System Libraries #include <iostream> using namespace std; //User Libraries //Global Constants //Function Prototypes //Executio Incipio int main(int argc, char** argv) { //Declare Variab...
ALGO
0.989021
3.197523
bad7c14f-b0b2-4af7-a395-05621a09f999
itsanamulhassan/c_programming_2024
02. More about Class & String/07 Array of Objects/sort_object.cpp
#include <bits/stdc++.h> using namespace std; class Student { public: string name; int roll; int marks; }; int main() { int n; cin >> n; Student students_info[n]; for(int i = 0; i < n; i++){ cin.ignore(); getline(cin, students_info[i].name); cin >> students_in...
ALGO
0.999895
4.30685
2a7e4148-ccc8-4be1-b50f-b2a9584a052d
ishandutta2007/codeforces
kmjp/normal/1728/A.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #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 FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999457
3.902053
16bebaaf-936b-4811-9ae1-20b5eeeeee0b
lesniak43/ProjektProgramistyczny2015
main.cpp
#include "utils.h" using namespace std; using namespace cv; const int MAX_ALLOWED_ENERGY = 437000000; int main() { Mat frame = Mat::zeros(480, 640, CV_64F); Mat face_image = Mat::zeros(480, 640, CV_64F); CascadeClassifier face_cascade; int reset_counter = 0; double alpha = 1; double tx = 3...
ALGO
0.986966
3.472552
36ac3019-f639-4627-a5a3-79b22e73dce4
Kartik-Mathur/INDL_CPP
Lecture-12/Permutations.cpp
// Permutations #include <iostream> using namespace std; int length(char *a){ int i; for(i=0;a[i]!='\0';i++){ } return i; } int main(){ char a[100],b[100]; int freq[26]={0}; cin.getline(a,100); cin.getline(b,100); for(int i=0;a[i]!='\0';i++){ int indx=a[i]-'a'; // freq[indx]=freq[indx]+1; freq[indx]++...
ALGO
0.99999
4.152544
2928def8-3045-43fd-9437-ab9c336324c8
aixinwang/atc
src/crypto/hmac_sha512.cpp
#include "crypto/hmac_sha512.h" #include <string.h> CHMAC_SHA512::CHMAC_SHA512(const unsigned char* key, size_t keylen) { unsigned char rkey[128]; if (keylen <= 128) { memcpy(rkey, key, keylen); memset(rkey + keylen, 0, 128 - keylen); } else { CSHA512().Write(key, keylen).Finalize(...
ALGO
0.936752
5.686802
23a1ddd5-1a91-4c74-b0fe-986ea26f97c2
kanishk333gupta/Data-structures
gfg/Inorder Traversal .cpp
#https://practice.geeksforgeeks.org/problems/inorder-traversal/1/# class Solution { public: // Function to return a list containing the inorder traversal of the tree. void helper (Node* root , vector<int>&v){ if(root!=NULL){ helper(root->left,v); v.push_back(root->data); ...
ALGO
0.999968
6.503688
a81b59ca-1aee-4492-9d0c-aae730bf53f4
SuperBigFive/Charming_XCPC
Codeforces/Div2/831(div1 + div2)/D.cpp
#include <bits/stdc++.h> #define ll long long #define int ll using namespace std; const int maxn = 1e6 + 5; int t, n, m, k; int rev[maxn]; void init () { } void charming () { init (); cin >> n >> m >> k; for (int i = 1, b; i <= k; ++i) { cin >> b; rev[b] = i; } for (int i = k, remain = n * m - 2, mx = 0; i...
ALGO
0.999845
4.341913
15d41b47-191a-420e-a1d7-94eaf0677409
klaymen1n/portal-sdk-2013
src/utils/vbsp/disp_vbsp.cpp
#include "disp_vbsp.h" #include "tier0/dbg.h" #include "vbsp.h" #include "mstristrip.h" #include "writebsp.h" #include "pacifier.h" #include "disp_ivp.h" #include "builddisp.h" #include "mathlib/vector.h" // map displacement info -- runs parallel to the dispinfos struct int nummapdispinfo = 0; mapdispinfo...
ALGO
0.932506
5.58144
50f66002-5e87-4ffa-a3af-32704af0b8b0
ishandutta2007/codeforces
blackbird137/normal/1391/C.cpp
#include<iostream> #include<algorithm> #include<cstring> #include<cstdio> #include<bitset> #include<cmath> #include<queue> #include<map> #include<set> #define int long long using namespace std; int read() { int ans=0,f=1; char c=getchar(); while(c>'9'||c<'0'){if(c=='-')f=-1;c=getchar();} while(c>='0'&&c<='9'){ans...
ALGO
0.99999
4.672862
c86a6164-7daf-4261-a7a2-16f492a7b40d
jaykakkar31/codes
300-longest-increasing-subsequence/300-longest-increasing-subsequence.cpp
class Solution { public: int lengthOfLIS(vector<int>& nums) { vector<int> v; int len=0; v.push_back(nums[0]); // len+=1; for(int i =1;i<nums.size();i++){ if(v.back()<nums[i]){ v.push_back(nums[i]); // len+=1; ...
ALGO
0.999989
5.976564