uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
255c5559-c4b0-4359-8c62-b13e610c7554
p-freire/CompProg
SPOJ/placar.cpp
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> using namespace std; struct aluno { char nome[21]; int qtdeProbRes; }; struct nomes { char nome[21]; }; int compare (const void *a, const void *b) { //return strcmp( *(char*)a->nome, *(char*)b->nome ); struct nomes ...
ALGO
0.999724
3.396789
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2016-05-09T23:08:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e74008e14...
3af9ab89-edb8-4760-be66-fe9d6fb7a5c7
mesely/CppMiniProjects-Games-Utilities-More
StackGommon/Board.h
// // Created by <NAME> on 9.04.2023. // #ifndef BOARD_H #define BOARD_H #include <iostream> #include <string> #include "CharStack.h" using namespace std; class Board { private: // Private member variables struct Slot { CharStack stack; Slot* next; Slot* prev; Slot () ...
ALGO
0.953031
5.864942
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-08-02T09:48:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27a45a9d762c...
8c854e4d-8191-45ce-989d-b2be30c94280
stomachacheGE/leetcode
62.不同路径.cpp
/* * @lc app=leetcode.cn id=62 lang=cpp * * [62] 不同路径 */ // @lc code=start class Solution { public: int uniquePaths1(int m, int n) { // intialization if (m == 0 && n == 0) return 0; vector<vector<int>> states(m, vector<int>(n, 0)); for (int i=0; i<m; i++) states[i][0] = 1; ...
ALGO
0.999148
5.499412
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-03-11T15:34:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03893d74a6...
0488c1da-ebeb-4332-ad66-f5a853d0074d
Oein/PS
acmicpc/1____/14___/148__/1486_/14867/14867.cpp
#include <vector> #include <algorithm> #include <queue> #include <iostream> #include <map> #include <set> #include <math.h> #include <numeric> #include <cassert> #include <unordered_set> using namespace std; typedef long long ll; typedef unsigned long ull; typedef pair<int, int> pii; int dx[] = {0, 0, 1, -1}; int dy...
ALGO
0.999905
3.419802
{ "github_metadata": { "branch": "main", "commit_count": 998, "repo_created_at": "2023-09-22T23:36:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06a42fc646...
f1cddea6-603f-436b-bb42-0d7ed8f42440
alejandrofonsecacuza/Problems-solved
Problems/CSES Problem Set/Mathematics/Exponentiation.cpp
#include <iostream> using namespace std; const int mod = 1e9 + 7; long long fast_pow(long long a, long long b) { if (b == 0) return 1; if (b == 1) return a % mod; long long result = fast_pow(a, b / 2); result = (result * result) % mod; if (b % 2 != 0) { result = (result * a) % mod; ...
ALGO
0.999834
5.57479
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-02-27T02:15:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a45c6ec6fb8...
63e8f978-be28-4e61-b953-1f74b4a4360e
arpangoswami/Competitive-Programming-and-DSA
fill_the_matrix.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; int main(int argc, char const* argv[]) { ios_base::sync_with_stdio(false); cin.tie(nullptr); int test; cin >> test; while (test--) { bool flag = true; unordered_set<int> s1; unordered_set<int> s2; int n, q; ci...
ALGO
0.999676
4.590164
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-11-06T07:11:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "917d5f54fece...
39a278c0-0357-4c7e-8c70-d09b9e22da37
ErnestL1n/LeetCode
Solutions/91. Decode Ways/91. Decode Ways.cpp
// Top down DP + memo class Solution { public: int memo[100]={}; int numDecodings(string s) { return dp(s,0); } int dp(string& s,int i){ if(i==s.size()) return 1; if(memo[i]!=0) return memo[i]; int res=0; if(s[i]!='0') res+=dp(s...
ALGO
0.999891
5.387434
{ "github_metadata": { "branch": "main", "commit_count": 3649, "repo_created_at": "2020-05-21T12:41:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b8e22baa...
1730bf9d-d2d2-408c-baa5-f03d0d77864d
piction/mesh-slicer
src/meshSlicer.cpp
#include "meshSlicer.h" MeshSlicer::MeshSlicer (const std::shared_ptr<MeshData> meshData) :_meshData(meshData) {} void MeshSlicer::slice(const glm::vec3 & planeOrigin ,const glm::vec3 & planeNormal , MeshData & resultUpper , MeshData & resultLower ) { // create a transformer to reference mesh to the referenc of...
ALGO
0.911863
5.406566
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2021-10-31T20:21:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ebab9ccaba...
15aa1efc-5ec9-410e-a994-f1f43ac7730d
Stephan14/Data_Structures_and_Algorithm_Analysis_in_C
other/Offer/p33.cpp
#include<iostream> #include<algorithm> #include<cstring> using namespace std; #define MAX 101 #define MAX_NUM 10 char str_combine1[ 2*MAX_NUM ],str_combine2[ 2*MAX_NUM ]; int compare( const void* str1, const void* str2 ) { strcpy( str_combine1, *( const char ** )str1 ); strcat( str_combine1, *( const char *...
ALGO
0.999785
4.289998
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2016-09-04T13:53:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd6f5072a...
29aedb9f-86a9-434e-9e40-709355473deb
aimalexe/DCSE
semester_3_(fall-22)/Object Oriented Programming Theory/Assignments and Lectures/Queue.cpp
//<NAME>. #include <iostream> using namespace std; const int MAX_QUEUE_SIZE = 100; template <class QueueType> class Queue { private: QueueType data[MAX_QUEUE_SIZE]; int _front; int _rear; public: Queue() { _front = _rear = 0; } void putInQueue(QueueType item); QueueType getFromQ...
ALGO
0.919663
4.324352
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2022-05-11T08:31:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abf993587c...
ad7caf05-5099-4cba-9e98-685b3dd2003a
maxned/Data-Structures-Code
Queue/Queue.cpp
#include <iostream> #include <fstream> using namespace std; struct node { int item; node *next; }; void enqueue(int item, struct node *&front, struct node *&rear); void dequeue(struct node *&front, struct node *&rear); void traverse(node *front); int main() { ifstream input; input.open("input.txt"); int numb...
ALGO
0.999935
4.013592
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-12-20T21:41:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "969af8d4df...
d802c78d-89cd-47f2-8184-914b265dad7e
switchpiggy/Competitive_Programming
CodeForces/Gym/ITMO Academy/Disjoint Sets Union/Step 1/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; ll p[100007], n, m; vector<ll> v[100007]; ll get(ll x) { return p[x]; } void uni(ll a, ll b) { ll x = a, y = b; if(p[x] == p[y]) return; if((ll)v[p[x]].size() > (ll)v[p[y]].size()) swap(x, y); ll cur = p[x]; for(ll i = 0;...
ALGO
0.999964
4.696435
{ "github_metadata": { "branch": "master", "commit_count": 164, "repo_created_at": "2020-08-27T23:38:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a481ebd5...
0af41679-b78e-4d4d-99dd-546524f85506
Harsh-Vardhan-Singh-Shekhawat/Dsa_CPP
bit_manipulation/2_in_unique.cpp
#include <iostream> using namespace std; int getbit(int a, int index) { return ((a & (1 << index)) != 0); } void unique(int a[], int n) { int xor_sum = 0; for (int i = 0; i < n; i++) { xor_sum = xor_sum ^ a[i]; } int setbit = 0; int pos = -1; int temp_xor = xor_sum; while (se...
ALGO
0.999993
4.14722
{ "github_metadata": { "branch": "master", "commit_count": 133, "repo_created_at": "2022-10-21T16:43:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a90bd682...
ed5ff1e4-a370-4374-80a3-18ad94ec5e0d
DianaZabelina/cpp-labs-university
2021_09_rocks/Rocks.cc
#include <iostream> #include <random> /* * Игра "Камни" * * 2 игрока (пользователь и компьютер) по очереди берут 1, 2 или 3 камня из кучи. * В куче N камней (количество выбирается рандомно). * Проигрывает тот, кто взял камень последним. * * 1. Цикл завершается, когда проигрывает один из игроков. * 2. По оконч...
ALGO
0.998768
4.361435
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2021-09-11T09:32:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c03060b43...
bba0bc95-1db6-4168-bc19-89f8936f42b2
svn2github/kratos
kratos/applications/trilinos_application/external_includes/amgcl_solver.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: <NAME> // <NAME> // #if !defi...
ALGO
0.998934
5.213194
{ "github_metadata": { "branch": "master", "commit_count": 19343, "repo_created_at": "2016-03-24T17:47:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "ba3db4...
4f4b0e44-39ea-4a0a-96e8-bbe53839d609
ErenBeykent/Tree-List-Pointers
Bagliliste1.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; class Node{ public: int data; Node *next; }*yeni,*ilk,*son,*iki; int main() { yeni=(Node*)malloc(sizeof(Node)); cout <<"Adres : " <<yeni<< endl; yeni->data=2020; yeni->next=NULL; ...
ALGO
0.973325
3.11576
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-09-05T18:07:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "807995636c...
e50d910e-e0c3-406a-8c9f-eb3e221391b2
kummandas/400DSA
HEAP/117.CPP
/*/* Time Complexity : O(K + (N-K)*log(K)) Space Complexity : O(K) where N is the array's size and K is the index of 'K-th' smallest element. // Heapify the subtree rooted at index 'i' void heapify(int i, int heapSize, vector<int>& arr) { int left = 2 * i + 1, right = 2 * i + 2, largest = i; if...
ALGO
0.999991
6.045934
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-06-28T06:01:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d0db57d3a9...
7d0f0c2f-60b5-4916-a193-68d6e389fd18
renatoas77/Jogo-da-velha
JogoDaVelha.cpp
#include <iostream> class Velha { private: int Malha[3][3]; int Posicoes{ 1 }; int Resposta; int JogadorAtual{ 10 }, ProximoJogador{ 0 }, Auxiliar{ 11 }; char SimboloAtual{ 'X' }, ProximoSimbolo{ 'O' }, SimboloAuxiliar{ 'K' }; int PontosX{ 0 }, PontosO{ 0 }; bool Validade, Venceu{ false }; ...
ALGO
0.990885
4.48395
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-01-26T23:48:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "182845c1d3...
e5d02a3e-93d7-4318-bfa6-9f7a99fb0603
Tudor67/Competitive-Programming
LeetCode/Problems/Algorithms/#164_MaximumGap_sol5_bucket_distribution_O(N)_time_O(N)_extra_space_4ms_8.8MB.cpp
class Solution { public: int maximumGap(vector<int>& nums) { const int INF = 1e9; const int N = nums.size(); const int MIN_ELEM = *min_element(nums.begin(), nums.end()); const int MAX_ELEM = *max_element(nums.begin(), nums.end()); if(MIN_ELEM == MAX_ELEM){ ...
ALGO
0.999905
5.770299
{ "github_metadata": { "branch": "master", "commit_count": 615, "repo_created_at": "2020-02-27T19:56:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2290b6ff...
88fae3ec-1016-4aea-b940-9a810f7e1321
45-Akash/LeetCode
0345-reverse-vowels-of-a-string/0345-reverse-vowels-of-a-string.cpp
class Solution { public: string reverseVowels(string s) { string sub=""; int n = s.length(); for(int i=0; i<n; i++) { char c = s[i]; if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'A' || c == 'E' || c == 'I' || c == 'O' || ...
ALGO
0.999654
6.067116
{ "github_metadata": { "branch": "main", "commit_count": 1825, "repo_created_at": "2022-01-03T16:41:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce5335ad1...
5f105a59-73b2-4aa0-9cff-633152065b6d
paoqi1997/NowCoder
written_examination/src/NetEase-06.cpp
#include <iostream> using namespace std; int dp[10 + 1][100000 + 1]; const int mod = 1000000007; int main() { int n, k; cin >> n >> k; // 长度为1且尾数为j的数列个数 for (int j = 1; j <= k; ++j) { dp[1][j] = 1; } for (int i = 2; i <= n; ++i) { int sum = 0; // 上一行的数列个数 for ...
ALGO
0.999924
4.154394
{ "github_metadata": { "branch": "master", "commit_count": 274, "repo_created_at": "2018-12-29T15:21:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f17fbd4...
579f9929-9992-4737-9a7f-68bad0dc35f3
wyxwyx46941930/WebSecurity
ws_ss2016_16340226_王迎旭_assign_2/MD5.cpp
#include "MD5.h" #include <stdio.h> using namespace std ; /* private: //输入的字符串 string input ; //使用vector存放输入字符串的二进制信息 vector<bool> binary_input ; //记录初始信息的长度 int length ; //存放length的二进制码 vector<bool> binary_length ; //使用 bitset 类型的 A B C D ...
ALGO
0.995152
4.951784
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-12-10T13:50:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da396b8664...
cd5a26c0-e1e2-411e-b64d-418a95ae31ba
Lkzeu/beecrowd
1 - Beginner/1015 Distance Between Two Points.cpp
/* Read the four values corresponding to the x and y axes of two points * in the plane, p1 (x1, y1) and p2 (x2, y2) * and calculate the distance between them, * showing four decimal places after the comma */ #include <iostream> #include <cmath> double pointDifference(const double x, const double y) { return ...
ALGO
0.999762
5.502621
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2022-11-19T20:31:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c0ea355f199...
3c43bdcf-0cb8-4f4d-ae8c-a9a9d1ed9f2a
Bolpat/ProgMath
Prog2/WS14/blatt02.cpp
// Entwurf zu Aufgabe 2, WS 2014/2015 // Programmieren II fuer Mathematiker #include <iostream> #include <iomanip> #include <vector> #include <algorithm> using namespace std; template <typename T> class Polynom { private: vector<T> a; inline void rmZeros() { int j = a.size(); while ...
ALGO
0.999826
4.345656
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2015-06-12T16:50:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77f6a044e...
508badfe-b9a2-44b5-be08-c9290d9fcc2b
yanzipei/atom_wallpaper
atom_wallpaper/main.cpp
#include <array> #include <cmath> #include <SFML/Graphics.hpp> sf::CircleShape makeElectron(sf::Color color, float radius, float angle, float ellipse_angle, sf::CircleShape orbit, sf::Vector2u origin) { sf::CircleShape electron; electron.setFillColor(color); electron.setRadius(radius); sf::Vector2f position; f...
TOOL
0.941997
5.087908
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-09-08T16:40:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0256b1147...
96557d6d-eb8b-4e65-ac43-e87906fd1193
xhae/Contests
CodeForces/335/1b.cpp
#include <cstdio> #include <vector> #include <algorithm> #include <tuple> using namespace std; int n, m; tuple<int, int, int> edges[100000]; const int base = (1 << 17); pair<int, int> iTree[base << 1]; int delta[base << 1]; int ans[100000][2]; void pushdown(int cs, int ce, int ind) { iTree[ind].first += delta[ind]...
ALGO
0.999901
3.562232
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2015-08-24T08:03:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2d173171...
05831334-2bdf-45a7-9ccf-62d15bbe70c2
rodolfoap/cbox
030-STL/app.cpp
// See https://gist.github.com/satwikkansal/c959e89161cc60db16b412233177feab // A comprehensive include: #include <bits/stdc++.h>, see https://www.geeksforgeeks.org/bitsstdc-h-c #include <iostream> #include <algorithm> #include <list> #include <map> #include <queue> #include <stack> #include <string> #include <vector...
ALGO
0.950147
3.949389
{ "github_metadata": { "branch": "dev", "commit_count": 682, "repo_created_at": "2020-05-15T19:21:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd831187e17...
747ae3a8-0027-48d1-870d-5da4d3f838cb
kblackcn/oi
bzoj/1013/1013.cpp
/************************************************************** Problem: 1013 User: zxcvbnm123456 Language: C++ Result: Accepted Time:0 ms Memory:1272 kb ****************************************************************/ #include<iostream> #include<cstdio> #include<cstring> #include<cmath> co...
ALGO
0.99996
3.115266
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2018-02-23T09:08:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df95faed8...
18d1e9b7-d428-4436-889f-14a2c3993ab7
tententgc/comsci-path
css223/Homework-3/Homework-3-1.cpp
#include <iostream> using namespace std; int partition(int arr[], int start, int end) { int pivot = arr[start]; int count = 0; for (int i = start + 1; i <= end; i++) { if (arr[i] <= pivot) count++; } int pivotIndex = start + count; swap(arr[pivotIndex], arr[start]); ...
ALGO
0.999842
5.404692
{ "github_metadata": { "branch": "main", "commit_count": 105, "repo_created_at": "2021-11-18T15:04:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60c680bcf...
1c8bc4cf-a061-4e88-98f2-b1497b4b5720
jingminglake/Leetcode
combinationSumIII/combinationSumIII.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: vector<vector<int>> combinationSum3(int k, int n) { vector<vector<int> > res; vector<int> path; dfs(k, n, res, path, 1); return res; } void dfs(int k, int n, vector<vector<int> >& res, vector...
ALGO
0.999921
5.86815
{ "github_metadata": { "branch": "master", "commit_count": 1483, "repo_created_at": "2017-02-24T09:35:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0fbe1...
5d880a26-04aa-4a87-b923-a213e0daaf95
MHF2145/Data-Structure-2023
Pratice/Source Code/Hanif Furqan/Fifth/M.cpp
#include <bits/stdc++.h> bool breketsdhbelens(std::string expr); int main() { std::string expr; std::cin >> expr; if (breketsdhbelens(expr)) std::cout << "valdi" << std::endl; else std::cout << "unvaldi" << std::endl; return 0; } bool breketsdhbelens(std::string expr) { std:...
ALGO
0.99808
5.516232
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-04-12T09:46:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c449b8f57d...
7818fa25-312d-4682-a664-ea836ab8d0e8
WhiZTiM/coliru
Archive2/d6/241361318e1925/main.cpp
#include <boost/function.hpp> #include <boost/bind.hpp> //shared mem #include <boost/multi_index_container.hpp> #include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index/member.hpp> #include <boost/interprocess/managed_shared_memory.hpp> #include <boost/interprocess/allocators/allocator.hpp> #include...
TOOL
0.967527
4.875779
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8cb237...
bddd198e-9584-4f1b-a394-93d4c4537a0a
jbartolozzi/CIS462_HW1
CurveEditor/spline.cpp
#include "spline.h" const int Division = 20; Spline::Spline(GraphWidget *graphWidget) :graph(graphWidget) { deleteNodes(interpPoints); deleteNodes(controlPoints); deleteNodes(curvePoints); deleteEdges(pseudoEdges); deleteEdges(curveEdges); deleteEdges(controlEdges); startPoint = NULL; endPoint = NUL...
ALGO
0.978917
4.89362
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2013-09-28T19:59:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fedf8ff169...
18eceb5c-6aad-45cd-8339-480bd2145e3a
MedAzizTousli/Competitive-Programming-Solutions
AtCoder/ABC058/C_Dubious_Document.cpp
#include <bits/stdc++.h> #define ll long long #define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) // rep(i, 1, 5) --> {1,2,3,4} // rep(i, 5, 1) --> {4,3,2,1} // rep(it, end(v), begin(v)) --> *it using namespace std; int main() ...
ALGO
0.99999
3.315655
{ "github_metadata": { "branch": "master", "commit_count": 505, "repo_created_at": "2019-04-23T21:46:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d648beeb...
1c58c2c2-afff-42d2-8432-ecdc0513c611
vageshvaibhav/TradeBrokersolution
Strategy.h
#ifndef STRATEGY_H #define STRATEGY_H #include <map> #include <iostream> #include <memory> #include <vector> #include <set> #include "Order.h" #include "Broker.h" /** * @class Quote * @author vagesh * @date 18/10/2015 * @file Strategy.h * @brief Used in Strategy class functions in calculation of best quotes from ...
ALGO
0.90823
5.353373
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-10-18T13:26:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e38ecb6a25...
107f35cc-631c-40fe-bc49-e83e1c10553a
zipdang04/VOI2021
ThayHieu/20201023/convex.cpp
#include <bits/stdc++.h> using namespace std; /* #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; */ typedef long long ll; typedef long double ld; typedef vector...
ALGO
0.999371
4.311364
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-03-08T09:16:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44f9d3f7ca71...
b043c778-0a55-4698-97ab-33334afaf61a
amcauley/rayTrace
SourceCode/AabbTree.cpp
#include "AabbTree.hpp" #include <assert.h> Aabb3dNode::Aabb3dNode() : left(NULL), right(NULL), objs(NULL) {} Aabb3dNode::~Aabb3dNode() { if (left != NULL) delete left; if (right != NULL) delete right; if (objs != NULL) delete[] objs; } void Aabb3dNode::buildNode(Object** inputObjs, int nObj, int lvl, in...
ALGO
0.998449
6.099297
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2015-07-20T04:34:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7b8aedc5...
3a0859b3-a735-4bed-bdad-326c6013e21c
bjourne/rt-article
src/triangle_intersector_embree.h
// ======================================================================== // // Copyright 2009-2018 Intel Corporation // // Copyright 2019 <NAME> <<EMAIL>> // // // // Licensed under the A...
ALGO
0.957561
5.977959
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2019-08-09T11:13:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f43c24967...
6683f07c-67b5-4392-9ac6-b3a6dc50447f
skotish06/Cplusplus-Repository
oj/codeforce/cogiaiquocgia/ps-bn/truyenhinh.cpp
#include <bits/stdc++.h> #define int long long #define MOD 1000000007 #define INF 1e18 #define MAXN 100005 #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define REP(i, n) FOR(i, 1, n) #define all(a) (a).begin(), (a).end() #define pb push_back #define fi first #define se second #define pii pair<int, int> #define...
ALGO
0.999932
3.756723
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2025-01-28T16:16:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac0a18bae...
93cfc65a-f33a-4433-aaf5-929f12ce75ab
hengli/camodocal
src/ceres-solver/internal/ceres/incomplete_lq_factorization.h
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2013 Google Inc. All rights reserved. // http://code.google.com/p/ceres-solver/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistr...
ALGO
0.984885
7.674543
{ "github_metadata": { "branch": "master", "commit_count": 200, "repo_created_at": "2013-03-14T10:42:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1235, "forks": 392, "issues": 54, "pull_requests": 2 }, "file_meta": { "content_id": "f7...
a85a6a9c-1d4f-4149-8304-e57c68b80218
Mangern/kattis
exponial/main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 100000; bool isp[N]; vector<ll> primes; ll phi(ll n) { ll ans = n; for (ll i = 0; i < primes.size() && primes[i] * primes[i] <= n; ++i) { if (n % primes[i] == 0) ans -= ans / primes[i]; while (n % primes[i] == ...
ALGO
0.999993
5.036763
{ "github_metadata": { "branch": "main", "commit_count": 670, "repo_created_at": "2023-07-30T22:09:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d83e97710...
68e9dc28-9069-40d9-a7b1-ed3eb857c6cc
libeicun/Astrid.PowerSystem.OPF
Code/powersys_calc/methods/nl/MethodNewtonRaphsonDeltaPQU2Builder_IterCSR.cpp
#include "MethodNewtonRaphsonDeltaPQU2Builder_IterCSR.h" CMethodNewtonRaphsonDeltaPQU2Builder_IterCSR::CMethodNewtonRaphsonDeltaPQU2Builder_IterCSR() { } CMethodNewtonRaphsonDeltaPQU2Builder_IterCSR::~CMethodNewtonRaphsonDeltaPQU2Builder_IterCSR() { } pf_bool CMethodNewtonRaphsonDeltaPQU2Builder_IterCSR::Builder...
ALGO
0.995726
3.325084
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-01-30T07:53:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f9542e780...
5f91d3e5-a38f-4892-a5a8-798089626bec
KqSMea8/UtilsDir
ZETLAB/ZETTools/ippFiltr/IirFiltrSimple.cpp
//---------------------------------------------------------------------- // Файл IirFiltrSimple.cpp // Версия от 28.02.2012 // ЗАО "ЭТМС", Зеленоград, <NAME>. //---------------------------------------------------------------------- #include "StdAfx.h" #include <ippFiltr\IirFiltrSimple.h> //-----------------------------...
ALGO
0.971984
4.91122
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-02-27T15:53:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9716fcd91...
bf871013-55c5-4d9f-8a93-349359097f68
lingowua/Leetcode
AnswerByCpp/1027_Longest Arithmetic Sequence.cpp
#include<iostream> #include<vector> #include<unordered_set> #include<unordered_map> #include<numeric> #include<algorithm> using namespace std; /* 1027. 最长等差数列 给定一个整数数组 A,返回 A 中最长等差子序列的长度。 回想一下,A 的子序列是列表 A[i_1], A[i_2], ..., A[i_k] 其中 0 <= i_1 < i_2 < ... < i_k <= A.length - 1。并且如果 B[i+1] - B[i]( 0 <= i < B.length - 1)...
ALGO
0.999627
5.114923
{ "github_metadata": { "branch": "master", "commit_count": 2306, "repo_created_at": "2018-09-14T01:49:15.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "Azhao1993/Leetcode", "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "conten...
ede680bb-c083-436b-8033-15595c1a6d61
rvikunwar/CP
boilerplate/trie.cpp
// trie.cpp #include <bits/stdc++.h> using namespace std; class TrieNode { public: TrieNode* child[26]; bool isEndOfWord; TrieNode() { isEndOfWord = false; for (int i = 0; i < 26; i++) { children[i] = nullptr; } } }; class Trie { private: TrieNode* root; p...
ALGO
0.999716
6.256897
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2024-03-03T17:17:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39b970519...
af120436-f94b-4680-9cb9-fd5f4915817d
josecamata/dcc012b-lab-btree
main.cpp
#include <iostream> #include <chrono> using namespace std; #include "btree.h" #include <unistd.h> typedef chrono::high_resolution_clock Clock; int randint(int min, int max) { return min + rand() % (max - min + 1); } void print_help(char * argv) { cout << "Uso: " << argv << " -o [ordem] -n [numero de inserç...
ALGO
0.995962
4.219329
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-07-07T14:12:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1222744466...
74864041-1ab1-4cb0-a506-e46002684803
rabbitmjh/BaekjoonRabbitmjh
백준/Gold/2610. 회의준비/회의준비.cc
#include <iostream> #include <algorithm> #include <functional> #include <utility> #include <vector> #include <queue> #include <string> #include <string.h> #include <math.h> #include <limits.h> using namespace std; typedef pair<int, int> p; typedef pair<int, p> pp; typedef long long ll; int n, m, K; int arr[105][105], ...
ALGO
0.99999
3.264936
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2022-10-31T03:09:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c33a0b9225...
1d328476-75b1-4bf6-b52c-36c4d570967a
arthurherbout/crypto_code_detection
data/code-jam/files/11254486_magula_5695413893988352_0_extracted_B.cpp
#include <cstdio> #include <string> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <queue> #include <map> #include <stack> #include <cassert> using namespace std; typedef long long LL; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii > vii; typedef queue<int> qi; ty...
ALGO
0.999968
3.460955
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2019-09-20T18:35:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "12f63d45...
1b6599c6-036f-46a3-a0b3-ff71011fb740
Sunny-Saurya/Cpp_Programming
LinkedList/LinkedListRevision/reverseLL.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node* next; Node(int data){ this -> data = data; this -> next = NULL; } }; void insertAtHead(Node* &head, int data){ Node* newNode = new Node(data); ...
ALGO
0.999929
4.843164
{ "github_metadata": { "branch": "main", "commit_count": 503, "repo_created_at": "2024-05-18T13:41:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9388f7183a...
cc7e782b-7321-4e72-9eae-88e275e41e5f
kyw04004/ProblemSolving
BOJ/17090_미로 탈출하기.cpp
#include<stdio.h> #include<iostream> using namespace std; int chk[505][505]; char arr[505][505]; int win[505][505]; int n, m,s,sum,c; void dfs(int x, int y) { chk[x][y] = 1; s++; if (x<1 || x>n || y<1 || y>m||win[x][y]==1) { s--; sum += s; c = 1; return; } else { if (arr[x][y] == 'U') { x -= 1; ...
ALGO
0.999869
3.546295
{ "github_metadata": { "branch": "master", "commit_count": 824, "repo_created_at": "2019-10-21T10:45:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd337852...
3dca2f5f-40a9-4c0e-b37b-9eb3ea8c3fcb
abhishek0007/OnLineCoding
HackerRank/Euler/11.cpp
#include<bits/stdc++.h> using namespace std; int dl[] = {0, 1, 1, 1}; int dr[] = {-1, -1, 0, 1}; int grid[20][20]; int main() { for (int i = 0; i < 20; i++) for (int j = 0; j < 20; j++) cin >> grid[i][j]; int result = 0; for (int i = 0; i < 20; i++) { for (int j = 0; j < 20; j++...
ALGO
0.999944
3.912429
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2016-03-26T09:48:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4ea5e5cf...
fb22e59c-bc97-4687-bbdf-7805f7d96292
josiahtripp/Fun-Graphical-Applications
tron/main.cpp
#include <raylib.h> #include <vector> using namespace std; void Grid(); struct LineSegment{ int startX, startY; int endX, endY; }; int main(){ int direction = 0; int previousDirection = -1; bool hasSwapped = false; int x = 300; int y = 240; int sizeX = 20; int sizeY = 10; int v1 = 2; vec...
ALGO
0.962031
4.323204
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-09-28T00:23:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c13b8eced25e...
eeed5775-5d8c-478a-85ca-f1c3e927892b
minhducubc97/Leetcode-practice
0022. GenerateParentheses/code.cpp
// Given n pairs of parentheses, write a function to generate all combinations // of well-formed parentheses. // Example 1: // Input: n = 3 // Output: ["((()))","(()())","(())()","()(())","()()()"] // Example 2: // Input: n = 1 // Output: ["()"] // Constraints: // 1 <= n <= 8 #include <string> #include <vector> usi...
ALGO
0.998861
6.673576
{ "github_metadata": { "branch": "master", "commit_count": 207, "repo_created_at": "2020-12-30T00:13:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f1a641f...
d2d641fd-1511-4f0d-b4c1-10481557e9e6
liuyubobobo/Play-Leetcode
0001-0500/0007-Reverse-Integer/cpp-0007/main.cpp
/// Source : https://leetcode.com/problems/reverse-integer/description/ /// Author : liuyubobobo /// Time : 2018-07-08 #include <iostream> using namespace std; /// Using long long to solve the overflow problem /// Time Complexity: O(logx) /// Space Complexity: O(logx) class Solution { public: int reverse(int ...
ALGO
0.99992
5.146671
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "70...
83a827d7-4e3b-4855-8161-7b25d65bad5b
LukeZeller/contest-notebook
computational-geometry/convex polygon/point inclusion.cpp
/* * Description: convex polygon inclusion * Demo: pointInTriangle returns if point is in/on/out of triangle * pointInConvexPolygon returns pair where first is in/on/out value and * triangle (poly[0], poly[second - 1], poly[second]) contains point */ int pointInTriangle(polygon &triangle, pt &p) { in...
ALGO
0.999893
5.501089
{ "github_metadata": { "branch": "master", "commit_count": 290, "repo_created_at": "2018-11-10T05:57:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b241ab61...
2d8b2692-38db-4deb-93b6-a2c2ec64bddb
wanglss-2024/ADstratification
PLNMRM/src/nlopt_wrapper.cpp
#include "nlopt_wrapper.h" // --------------------------------------------------------------------------------------- // Algorithm naming // List of all supported algorithms and associated names struct AlgorithmNameAssociation { const char * name; nlopt_algorithm enum_value; }; static const AlgorithmNameAssoc...
TOOL
0.991634
6.505556
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-13T22:08:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "714a475b4f40...
1a6f22b3-7e0e-4d3e-a6a2-5082677196d0
realchoi/CharacterRecognition
CharacterRecognition/PreProcess.cpp
#include "cv.h" #include "highgui.h" #include "cxcore.h" #include "ml.h" //包含CvSVM #include <string> using namespace cv; using namespace std; string recognition(IplImage *test); string resultStr; int preProcess(char* imgPath, char *correctAnswers, int score) { //cout << imgPath << endl; //IplImage *srcImage = cvL...
TEST
0.927887
3.192081
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-06-12T14:01:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b97ce9ab5...
084c2c9a-7ad7-4a3c-a01e-152c01ddd363
min9813/algorithm_contest
contest/abc172/c.cpp
#include <iostream> #include <functional> #include <cstdio> #include <algorithm> #include <cmath> #include <vector> #include <string> #include <set> #include <queue> #include <map> #include <iomanip> #include <complex> #include <random> #include <bitset> #include <list> // #include <prettyprint.hpp> using namespace std...
ALGO
0.999943
3.252699
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-02-02T13:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "959b8b691...
a70655c3-34ff-4f70-9b08-3027e290441d
i-ensarkok/Project-Euler-Solutions
Problem_5/Euler_5.cpp
#include <iostream> #include <vector> using namespace std; int main() { int limit =20; // This is variable vector <int> prime; vector <int> power; int product = 1; for (int i = 2; i <= limit; i++) { int number = i; int max = 0; for (int j = 2; j <= ...
ALGO
0.999969
5.049374
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2020-12-07T20:18:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7626d689388...
1fcbd45c-d23a-4b56-af50-4f9f1ba79c73
taiya/starlab-mcfskel
surfacemesh_filter_mcfskel/MeanValueLaplacianHelper.h
#pragma once #include "SurfaceMeshHelper.h" class MeanValueLaplacianHelper : public virtual SurfaceMeshHelper{ public: MeanValueLaplacianHelper(SurfaceMeshModel* mesh) : SurfaceMeshHelper(mesh){} ScalarHalfedgeProperty computeMeanValueHalfEdgeWeights(Scalar edgelength_eps=0.0, char* property="h:weight"){ ...
ALGO
0.995234
6.337283
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2015-03-13T03:21:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 128, "forks": 30, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "1fbf91...
ec189a5e-ad37-4174-ae07-e4de2e94631d
NguyenLabJHU/Tahoe-FEM
tahoe-dev/src/elements/membrane_fluid_interaction/node.h
#ifndef NODE_H #define NODE_H #include "matrix.h" #include "globfuncs.h" #include "realtypes.h" #include "parameters.h" namespace memFluid{ class node{ friend class ele2dcoupled; friend class activepoint; private: REAL nodex, nodey; // coords int num_node9; // the number in node9, initially -1 int num...
ALGO
0.907487
5.034299
{ "github_metadata": { "branch": "master", "commit_count": 8283, "repo_created_at": "2024-02-10T06:20:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bda336da...
a788be0c-c5e9-46a5-8069-81037153a38b
BanRuoBoLuo/LeetCodeSolution
558_QuadTreeIntersection.cpp
/****************************************************************************************** 558. Quad Tree Intersection Easy A quadtree is a tree data in which each internal node has exactly four children: topLeft, topRight, bottomLeft and bottomRight. Quad trees are often used to partition a two-dimensional space ...
ALGO
0.999946
6.341728
{ "github_metadata": { "branch": "dev", "commit_count": 20, "repo_created_at": "2018-11-09T03:47:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e39d2b67406...
94f2178b-e2c7-4762-9c10-5c8cbc8cd216
SaravanaBalaji123/cses
CodeForces/C. Tea Tasting.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int upper_bound(ll arr[], int n, ll x) { int low = 0, high = n; // high is set to n (size of array) while (low < high) { int mid = low + (high - low) / 2; // Calculate mid-point if (arr[mid] > x) { high = mid; // Na...
ALGO
0.999971
3.542916
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-07-19T13:58:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5cb767264e6...
31ea7b24-edb3-453c-8f75-7d389d4c0845
jhy1812/algorithm
백준/Bronze/2445. 별 찍기 - 8/별 찍기 - 8.cc
#include <iostream> int main() { int n; std::cin >> n; for (int i = 1; i <= n; i++) { for (int j = i; j > 0; j--) { std::cout << "*"; } for (int k = 2 * (n - i); k > 0; k--) { std::cout << " "; } for (int l = i; l > 0; l--) { std::cout << "*"; } std::cout << std::endl; } for (int i = ...
ALGO
0.999967
4.047532
{ "github_metadata": { "branch": "master", "commit_count": 1174, "repo_created_at": "2023-02-17T03:04:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "307b2fe...
4d5c234f-6d5f-43e8-a2d2-da98350858cb
dasbd72/operating-system-2022-mp3
threads/scheduler.cc
// scheduler.cc // Routines to choose the next thread to run, and to dispatch to // that thread. // // These routines assume that interrupts are already disabled. // If interrupts are disabled, we can assume mutual exclusion // (since we are on a uniprocessor). // // NOTE: We can't use Locks to provide mutual exclusi...
TOOL
0.957894
6.271716
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2023-01-29T07:16:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7b0b4b2b...
5a9b4fe2-8549-48ee-9182-c543f206cad2
Abhijeet103/CodingQuestions
thresum.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int>> threesum(vector<int> arr , int targetSum ) { // iterate over the array // pic on element //apply two sum in rest of the array // using two pointer approach we can find two sum sort(arr.begin(), arr.end()); int n = arr.size(); vector<vector<int>> res...
ALGO
0.999075
5.336863
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-12-17T08:36:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "560c4cf383a9...
83d19711-0adf-4202-bd9e-ee2bdb5c3d73
johnathan79717/competitive-programming
Project Euler/Coin sums/main.cc
#include <iostream> using namespace std; const int MOD = 1000000007; struct Z { int i; Z():i(0) {} Z(int i): i(i >= 0 ? i : i + MOD) {} void operator +=(const Z& z) { i += z.i; if(i >= MOD) i -= MOD; } Z operator +(const Z& z) const { Z ret(i); ret += z; return ret; } }; int main() { const int MAX_N = 10...
ALGO
0.999405
3.890959
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2016-04-07T07:50:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ca0f2daa...
890c7220-b2ab-4d27-bf30-1cbcce8dd46e
MostlyFor/Algorithm_topic
leetcode/0200-number-of-islands/0200-number-of-islands.cpp
class Solution { int n, m; int ans=0; public: bool InRange(int x, int y){ return 0 <= x && x <n && 0<=y && y<m; } void bfs(vector<vector<char>>& grid, int x, int y){ ans++; queue<pair<int,int>> q; q.push({x,y}); grid[x][y] = '0'; int dx[4] = {0,0,...
ALGO
0.999983
5.997559
{ "github_metadata": { "branch": "main", "commit_count": 983, "repo_created_at": "2023-08-03T07:30:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f309ab90a...
7d0a44ce-cb94-4c35-b57e-2fa76a348dba
GaurishIIITNR/CP-Problems-Solutions
1154A.cpp
/* ======================================================================================== // **** ***** // // ***AUTHOR: <NAME>** // // *****DATE: 24-03-2022**** // // ******TIME:19:20:57****** // ==...
ALGO
0.999925
3.781758
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-11-17T10:53:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fbd7f9e5f9...
df06e523-0a6c-47f9-83bc-32cb4599aade
ritamsingal/VEX-World-Championship
Skills/src/drive.cpp
#include "main.h" #include "drive.h" #include "allinit.h" #include "motor.h" #include "correction.h" using namespace pros::literals; //globals init float correction_turn; //stored value that makes turns more accurate float degrees_flag; //targeted turn commandes given in PID loops float prev_correction_turn; ...
ALGO
0.993681
4.555227
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-04-08T04:00:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e4ce7149...
4a905f66-5807-4105-af02-aec35bf8750d
farleyrunkel/TinyBlender
required/MeshTools/MeshNavigationT.hh
/*===========================================================================*\ * * * OpenFlipper * * Copyright (c) 2001-2015, RWTH-Aachen University * * ...
ALGO
0.997317
5.973001
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-09-07T16:43:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a231aa87783...
383c12ab-5b8e-4635-a64d-10125d7ca9ab
tarabakz25/KyoPro
past202010-open/b/main.cpp
#include <bits/stdc++.h> using namespace std; using vec = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < n; i++) #define rep2(i, a, n) for (int i = a; i < n; i++) int main() { int n, m; cin >> n >> m; vector<vector<char[m]>> arr(n); rep(i, n) rep(j, m) { cin >> arr[i][j]; ...
ALGO
0.999957
3.902051
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-02T04:26:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c15e17f99154...
ca659da4-961a-4c87-a1fc-b456a6eda28f
gbrsouza/Algoritmos-de-busca
main.cpp
/* * © copyright 2017 - <NAME> * Todos os direitos reservados - <<EMAIL>> */ #include "Functions/functions.h" //Tamanho default do vetor a ser alocado //Representa o tamanho máximo que a máquina usada suporta #define N 536870912; //2^29 /** * Declaração de novo tipo: ponteiro para a assinatura * das funções...
ALGO
0.998884
5.02624
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-03-12T12:56:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3dab4bd2b...
3e150039-9525-4dfa-9a1b-adfc6f1a6951
rahulnagurtha/Mycode
kriti/2.cpp
#include <bits/stdc++.h> using namespace std; #define si(i) scanf("%d",&i) #define si2(i,j) scanf("%d %d",&i,&j) #define si3(i,j,k) scanf("%d %d %d",&i,&j,&k) #define slli(i) scanf("%lld",&i) #define slli2(i,j) scanf("%lld %lld",&i,&j) #defin...
ALGO
0.999406
3.681817
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2015-10-06T14:14:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bad0db86...
74eb3acd-672a-47ac-a09a-6c996d132413
halterman/CppBook-SourceCode
Chap20/iterarith.cpp
#include <iostream> #include <vector> // Print the contents of vector v, traversing with a // caller supplied increment value (inc) void print(const std::vector<int>& v, int inc) { for (auto p = std::begin(v); p != std::end(v); p += inc) std::cout << *p << ' '; std::cout << '\n'; } // Pr...
ALGO
0.998526
5.34593
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-11-30T04:14:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 46, "forks": 31, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4e269a05...
b2176282-9a37-42c6-a75c-ee4971b39277
loskyertt/GIS-algorithm-practice
02多边形填充-cpp/src/edge.cpp
#include "edge.hpp" #include <algorithm> #include <climits> #include <cmath> #include <cstddef> #include <iostream> #include <utility> #include <vector> void EdgeTable::addVertex(const Point& p) { vertices.push_back(p); } void EdgeTable::polygonFill() { int y_min = INT_MAX, y_max = INT_MIN; // 计算y的范围并初始化...
ALGO
0.997217
4.772455
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2024-11-24T12:35:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3ac4532b...
e15eeb4f-b553-432c-a130-fb73f24d9590
kassonlab/gmxapi
src/gromacs/linearalgebra/gmx_lapack/sgetri.cpp
#include "../gmx_blas.h" #include "../gmx_lapack.h" #include "lapack_limits.h" void F77_FUNC(sgetri,SGETRI)(int *n, float *a, int *lda, int *ipiv, float *work, int *lwork, int *info) { int a_dim1, a_offset, i__1, i__2, i__3; int i__, j, jb, nb, jj, jp, nn, iws; int nbmin; int ldwork; i...
ALGO
0.999576
4.688658
{ "github_metadata": { "branch": "master", "commit_count": 19315, "repo_created_at": "2017-05-25T14:05:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 53, "forks": 13, "issues": 93, "pull_requests": 2 }, "file_meta": { "content_id": "1d81...
aba50639-93e7-4ad1-b6f3-5cdef9265c0a
Dhliv/Competitiva
Codeforces/C/Interesting Story.cpp
#include <bits/stdc++.h> #define INF INT_MAX #define MINF INT_MIN #define ll long long #define ld long double #define PB push_back #define PF push_front #define P_F pop_front #define P_B pop_back #define F front #define B back #define f first #define s second #define MP make_pair #define FOR(i, a, b) for(ll i = a; i < ...
ALGO
0.999887
4.193536
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2020-10-15T03:14:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b017c852...
5446f5d2-40bb-4992-8f32-ade946d3cd8c
ChengyangWang01/project
main.cc
#include "heat.hpp" #include "heat_cylinder.hpp" #include "io.hpp" #include "core.cpp" #include <iostream> int main ( int argc, char ** argv ) { MPI_Init(&argc, &argv); constexpr int nmax {1'00000000}; constexpr std::size_t nx {300}, ny {90}, nz {80}; constexpr std::size_t nx_full {nx+2}, ny_full {ny+2}, nz_...
ALGO
0.999707
4.546105
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-08-31T16:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a16749c466ac...
3cea8628-afd8-4ecd-bf03-bf65f414e508
2001adarsh/Contests
Practice/Threads/mutex lock.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int #define endl "\n" #define mod 1000000007 #define inf 1e18 // Mutex : Mutual Exclusion /* Race Condition: 1. Race condition is a situation where two or more threads/process happen to change a common data at same time. 2. If there is a ...
ALGO
0.997307
4.065684
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2020-04-02T06:51:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8fbb60933...
c3fea797-ac94-40d6-937e-b7739229b4a8
ArthurCChen/LeetcodePracticeCpp
200509_69_x 的平方根.cpp
// 69. x 的平方根 // 实现 int sqrt(int x) 函数。 // 计算并返回 x 的平方根,其中 x 是非负整数。 // 由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去。 // 示例 1: // 输入: 4 // 输出: 2 // 示例 2: // 输入: 8 // 输出: 2 // 说明: 8 的平方根是 2.82842..., // 由于返回类型是整数,小数部分将被舍去。 // https://leetcode-cn.com/problems/sqrtx/ //My Codes // 执行结果:通过 // 执行用时 :28 ms, 在所有 C++ 提交中击败了11.3...
ALGO
0.999686
4.85392
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-03-28T10:47:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2cb3f2a6...
b51251b8-a2f4-49fa-b9ce-a9f70a0e230d
UtopiaBeam/2110327-AlgoDesign
Solutions/a59_q3_hole.cpp
/* * AUTHOR: <NAME> (UtopiaBeam) */ #include <cstdio> #include <queue> #include <algorithm> #define N 1000 #define INF 1<<30 using namespace std; struct S { int x, y, d; S(int x, int y, int d=0): x(x), y(y), d(d) {} }; queue<S> q; int mp[N+2][N+2]; int cnt[N+2][N+2]; int main() { for (int i = 1; i <=...
ALGO
0.999924
3.760941
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2019-01-10T04:13:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8aea7fadc...
7bdf2492-a9ec-4443-9522-bbd95c9dd4bf
nitesh038/data_structure_and_algorithm
binary_search_iterative_method.cpp
#include<iostream> #include<vector> #include<algorithm> #include <cmath> int find_element_using_binary_search(std::vector<int> input, int key) { int low = 0; int high = input.size(); double mid {std::round(input.size()/2)}; while(low <= high) { if(key == input[mid]) { re...
ALGO
0.999488
5.722933
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-12-12T21:01:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "953e91866...
76374dc2-dcae-45f1-b229-a0b59ab6f070
mangoqwq/competitive-programming
COCI/coci16c4p3.cpp
#include <bits/stdc++.h> using namespace std; #define ms(x, a) memset(x, a, sizeof x) typedef long long ll; const int mod = 1e9 + 7, inf = 0x3f3f3f3f; const int MN = 501, MC = 2e5 + 1; int lst[MC], dp[MC]; int main(){ cin.tie(0)->sync_with_stdio(0); int N; cin >> N; ms(lst, -0x3f); ms(dp, -0x3f); dp[...
ALGO
0.999978
3.784586
{ "github_metadata": { "branch": "master", "commit_count": 540, "repo_created_at": "2020-08-28T16:37:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8eb4897a...
8f4d8058-0143-471e-82a1-6f8da48fcc18
eggag32/Competitive-Programming
Codeforces/Yet Another Array Restoration.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef pair<int, int> pi; #define debug(x) cerr << #x << ": " << x << endl #define debug2(x, y) debug(x), debug(y) #define repn(i, a, b) for(int i ...
ALGO
0.999877
3.223907
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-09-24T22:38:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "352b75d0f...
7e8f8781-fb00-4381-9da8-6769a6e85689
Aadarshg087/competitive-programming
Leetcode/Daily Leetcode/1463_CherryPickUpII.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int n; int m; int t[71][71][71]; int solve(vector<vector<int>> &grid, int row, int c1, int c2) { // Base case if (row >= m) return 0; int cherry = grid[row][c1]; if (c1 != c2) cherry += grid[row][c2]; if (t[row][c1]...
ALGO
0.999935
4.380351
{ "github_metadata": { "branch": "main", "commit_count": 456, "repo_created_at": "2022-06-26T05:20:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5c0528051...
904dcac1-9272-45d9-b6df-9349b4208203
BeckyFerrelle0836/treasure-quest
src/openrct2/core/Crypt.h
/***************************************************************************** * Copyright (c) 2014-2025 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 * * OpenRCT2 is licensed under the GNU Gener...
TOOL
0.901545
7.28241
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-15T04:07:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54a154c95282...
08ac4ae8-5e5a-476a-bf48-e20d95f7e21d
xehoth/OnlineJudgeCodes
BZOJ/BZOJ2588.cpp
#include <bits/stdc++.h> inline char read() { static const int IO_LEN = 1024 * 1024; static char buf[IO_LEN], *ioh, *iot; if (ioh == iot) { iot = (ioh = buf) + fread(buf, 1, IO_LEN, stdin); if (ioh == iot) return -1; } return *ioh++; } template <class T> inline void read(T &x) { ...
ALGO
0.999996
4.171473
{ "github_metadata": { "branch": "master", "commit_count": 401, "repo_created_at": "2017-08-26T02:49:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ccb0d2b...
b2e47dda-3d29-438f-8265-19dd8e4ca23d
ArkadiuszStanislawLega/leetcode
020124/main.cpp
#include <iostream> #include <ratio> #include <string> #include <unordered_map> #include <vector> #include <algorithm> #include <cassert> #include <chrono> #include <map> using namespace std; using namespace std::chrono; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullpt...
ALGO
0.999937
5.229012
{ "github_metadata": { "branch": "main", "commit_count": 168, "repo_created_at": "2024-01-16T15:19:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65bc866aad...
f2acadd3-d215-4726-b484-1082dbf8a662
hristovskii/FINKI-stuff
SP/kolokvium_2/zad66-LABS7-MATRICI/lab7_zad2.cpp
/* Од стандарден влез се вчитува матрица сo m редици и n колони. Прво се вчитуваат броевите m и n а потоа и елементите на матрицата. Да се изврши min-max нормализација на секоја колона од матрицата, односно секој елемент во секоја колона да се замени со вредноста x−minmax−min каде што x е елемент во некоја колона,...
ALGO
0.999741
4.391326
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2024-11-10T12:05:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ccf7d98a...
17623bfd-1ef5-4e63-a219-778a2c945dd9
Vansh-22f300/Dsa
L17_Trees/14_LCA.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int data; node *left; node *right; node(int d) { data = d; left = NULL; right = NULL; } }; node *buildtree() { int data; cin >> data; if (data == -1) return NULL; node *root = ne...
ALGO
0.999988
3.664182
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2025-02-18T16:30:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0b6ccd08f3...
31faab5e-d520-42d8-aae9-2340f152aeb8
Seann0425/LeetCode
3509. Maximum Product of Subsequences With an Alternating Sum Equal to K.cpp
#include <bits/stdc++.h> using namespace std; 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) {} }; struct TreeNode { int val; TreeNode *left; TreeNode *righ...
ALGO
0.999932
4.942228
{ "github_metadata": { "branch": "main", "commit_count": 659, "repo_created_at": "2024-05-02T09:26:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b237b77aa...
37b30546-8914-48a6-a4d5-e5e84645b251
gustavothecoder/cp-solutions
reference/data_structures/binary_heap.cpp
#include <iostream> #include <limits.h> using namespace std; class BinaryHeap { private: int max_size; int *heap_array; int current_size; int parent(int key) { return (key - 1) / 2; } int left(int key) { return (2 * key) + 1; } int left_is_smaller(int key); int right(int key) { return (2 ...
ALGO
0.999818
4.346555
{ "github_metadata": { "branch": "main", "commit_count": 267, "repo_created_at": "2020-02-05T13:55:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a884b6db89...
9be5ec0f-dacb-44a8-ad0a-c1c81a3e39b2
ilovethebeatles/quadro
main.cpp
#include "quadratic.cpp" int main() { double a = 0; double b = 0; double c = 0; int idx = 100; short int num_of_roots = -1; printf("Press 0 if you want to enter a, b, c:\n"); printf("Press 1 if you want to print the equation's roots:\n"); printf("Press 2 if you want to find the number of roots:\n"); ...
ALGO
0.997544
3.909825
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-09-10T18:56:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c942171780c4...
f7ed3c74-63a7-4df4-a95d-323ef9d136da
Karen0student/RAU
C++/homework_20_02_2023/second.cpp
#include <iostream> #include <vector> int merge(std::vector<int> &vec, int left, int mid, int right){ int count = 0; int index1 = mid - left + 1; int index2 = right - mid; std::vector<int> first_vec(index1); std::vector<int> second_vec(index2); for(int i = 0; i < index1; ++i) firs...
ALGO
0.999971
5.051946
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2022-10-23T19:00:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3e78ebe1...
d208774b-717e-4c7f-8376-49865a20148e
openeuler-mirror/arkui-linux
arkcompiler/runtime_core/runtime/lock_order_graph.cpp
/* * Copyright (c) 2022-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
ALGO
0.981414
6.63574
{ "github_metadata": { "branch": "master", "commit_count": 303, "repo_created_at": "2023-06-16T02:58:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3f53a414...
667682ec-d9f0-4435-8d4b-f4bd28fecd70
xcf1992/leetcode
C++/sum_of_subarray_minimums.cpp
/* 907. Sum of Subarray Minimums https://leetcode.com/problems/sum-of-subarray-minimums/ Given an array of integers A, find the sum of min(B), where B ranges over every (contiguous) subarray of A. Since the answer may be large, return the answer modulo 10^9 + 7. Example 1: Input: [3,1,2,4] Output: 17 Explanation: Su...
ALGO
0.99996
6.179989
{ "github_metadata": { "branch": "master", "commit_count": 1784, "repo_created_at": "2017-12-26T04:19:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3cf61d5...
ffb40b95-68e2-47bd-bdde-63bd5ea71ea8
jakev/CobraDroidBeta
src/external/chromium/base/string_split.cc
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/string_split.h" #include "base/string_util.h" namespace base { bool SplitStringIntoKeyValues( const std::string& line, char ...
TOOL
0.983015
6.542244
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2013-06-24T07:16:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 7, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6649c9b26...
72a882e1-43a0-423f-aa32-05bf0f73520e
arn4/CompetitiveProgrammingCourse
Lezione_11-05/Fox_And_Names.cpp
/* <NAME> * * Competitive Programming and Contest, a.a. 2018-2019 */ /* SOLUTION DESCRIPTION: * We build the graph of the order comparing 2 consecutive words. Then, * we check if it is a DAG: if yes we return the topological sort, if no * we return Impossible. * Complexity: O( n ) both space and time. */ #...
ALGO
0.999979
3.900182
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2018-09-17T17:54:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bf90e40c...
141c94ae-5499-45d6-82fc-2f32efdfbcc2
Pakhi-v/Data_Structures
Problems/product_smallest_pair.cpp
#include <iostream> #include <algorithm> int productSmallestPair (int *array, int n, int sum) { int answer, temp, i, j, check; if (n < 2) { answer = -1; } else { for (i = 0; i < n; i++) { // sorting of array for (j = i + 1; j < n; j++) { if (array[i] > array[j]) { ...
ALGO
0.999676
3.780239
{ "github_metadata": { "branch": "main", "commit_count": 257, "repo_created_at": "2022-07-08T08:04:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68d4dbdc8e...