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
31c64d6e-b13a-444a-935e-3a3c08cda20c
elvircrn/ccppcodes
izraz.cpp
#include <cstdio> #include <cstdlib> #include <algorithm> #include <iostream> #include <vector> #include <string> #include <cstring> #include <stack> #include <cctype> #include <sstream> using namespace std; int get_pos (char op) { return ((op == '*' || op == '/') ? 1 : 2); } int process (int a, char op, int b) ...
ALGO
0.999809
3.667757
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-10-14T17:41:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d76096f5f2...
459fc359-04ca-42e0-9f46-8c26329ee328
Lan-ce-lot/overflow
2020xls/HDU/3/C.cpp
/************************************************************************* > FileName: > Author: Lance > Mail: <EMAIL> > Date: 9102.1.8 > Description: ************************************************************************/ //#include <bits/stdc++.h> //#pragma comment(linker, "/STACK:102400000...
ALGO
0.999953
3.720628
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2020-07-12T14:35: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": "0be21ff66...
0086c242-5a82-477f-9520-60884aec26ed
lagron1000/Anomaly-Detector
anomaly_detection_util.cpp
/* * anomaly_detection_util.cpp * * Author: * <NAME> 318720067 * <NAME> 208250225 */ #include <math.h> #include <cmath> #include "anomaly_detection_util.h" /** * Or's sum func: new array SUM precise function * @param x * @param size * @return */ float summer(float *x, int size) { float finalSum = 0; ...
ALGO
0.908821
3.803413
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2021-10-21T08:52:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bc54205088...
1f94bf05-1241-423a-afba-228f3eaab9e9
sraaphorst/mian-chowla-sequence
Apps/differences.cpp
/* * differences.cpp * * Look for the terms that generate the differences in the Mian-Chowla sequence. * * By <NAME>, 2018. */ #include <iostream> #include "MianChowla.h" using namespace std; using namespace vorpal::math; /** * Questions of interest and tasks: * 1. What if we allow 2-coverage of differences...
ALGO
0.987907
5.090208
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-05-04T14:16:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e7d7f864...
403bae95-5fd4-479a-ae99-58cabb65c0a7
ishandutta2007/codeforces-t
thienu/normal/778/C.cpp
#include <bits/stdc++.h> using namespace std; #define u_map unordered_map #define u_set unordered_set #define u_multiset unordered_multiset using ll = long long; using vvi = vector<vector<int>>; using vi = vector<int>; using vvll = vector<vector<long long>>; using vll = vector<long long>; using vd = vector<double>; ...
ALGO
0.99991
3.868422
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "b656a2c874b6...
5d42e768-4605-4444-97de-420fec624a66
Alex-Falk/Team3
Build/ncltech/CollisionDetectionSAT.h
/****************************************************************************** Class: CollisionDetectionSAT Implements: Author: <NAME> <<EMAIL>> and YOU! Description: This wrapper class is used to perform a Seperating Axis Therorem test between two convex collision shapes, firstly detecting if a collision occured...
ALGO
0.998806
4.239738
{ "github_metadata": { "branch": "master", "commit_count": 709, "repo_created_at": "2018-02-02T14:34:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6f3abbf7...
73e2ac28-9de3-4005-885c-a012a05aace5
HyanFerreira/questoes-tecnicas
tecnica_02.cpp
#include <stdio.h> int pertenceFibonacci(int num) { int a = 0, b = 1, c = 0; printf("%d %d ", a, b); if (num == 0 || num == 1) { return 1; } while (c < num) { c = a + b; a = b; b = c; printf("%d ", b); } if (c == num) { return 1; } ...
ALGO
0.999801
4.083306
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-16T17:54: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": "b5aa7b19012a...
d4092077-c84a-4268-b728-66ec638163b1
TheShenk/balanced_tree
tree.h
// // Created by shenk on 25.11.23. // #ifndef BALANCED_TREE_TREE_H #define BALANCED_TREE_TREE_H #include <ostream> #include <memory> #include <optional> template <typename ValueT> class TreeNode: public std::enable_shared_from_this<TreeNode<ValueT>> { int m_height = 0; std::optional<ValueT> m_value; st...
ALGO
0.997873
6.846468
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-26T09:12: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": "e5c3c4f6cbb8...
82635bf9-515a-43b4-88ec-00b813f0a8fc
vucongtuanduong/dsa-codeptit
submit/algo-design/graph/dsa09008/dsa09008_1.cpp
#include <bits/stdc++.h> using namespace std; struct Graph{ int nV; int nE; int edges[1001][1001]; }; void testCase(); void dfs(Graph *g, int v,bool *visited); int main () { int t; cin >> t; while (t--) { testCase(); cout << endl; } return 0; } void dfs(Graph *g, int ...
ALGO
0.999877
5.298031
{ "github_metadata": { "branch": "main", "commit_count": 682, "repo_created_at": "2023-12-21T11:07:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b8c706490...
e251a421-61f9-4388-9d23-b0df77ae13f1
piotrcurious/esp8266_solar_battery_monitor
lead_acid_junkbox/voltage_epaper/junkbox/graph_compressor/multipoly/multi_poly6a2_tidy/fit_lowmem/small2.cpp
#include <vector> #include <cmath> // Function to solve linear system using the Householder transformation std::vector<double> solveLinearSystemHouseholder(const std::vector<std::vector<double>>& ATA, const std::vector<double>& ATy, int m) { std::vector<std::vector<double>> R = ATA; std::vector<double> b = ATy...
ALGO
0.999953
6.403012
{ "github_metadata": { "branch": "main", "commit_count": 631, "repo_created_at": "2023-04-24T22:32: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": "0cf0381a19...
26980c03-a530-40ad-9f36-36f903482874
Mahesh1choudhary/CP
Templates/Bit_Operations/VectorBasis.cpp
#include <iostream> #include <bits/stdc++.h> #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #define pb push_back using namespace std; // link to blog- https://codeforces.com/blog/entry/68953 // we have n vectors in mod 2 and with d cordinate for each vector, so //maximum size ...
ALGO
0.999483
4.347659
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-11-01T13:31: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": "f2bc1bb59f36...
3fd8d2b5-7eb7-4a7f-b244-2c515c8e7920
darkin-blade/opencv_cpp
delaunayTriangulation_2.cpp
/* opencv的delaunay三角剖分 */ #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc_c.h> #include <iostream> using namespace cv; using namespace std; //随机产生一个点集 vector<Point2f> generatePointSet(int n, Rect rect) { vector<Point2f> pointSet; for (int i = ...
ALGO
0.955855
4.774508
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-10-23T01:34:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2a88d2f1c...
7e7b3bc4-fef3-406d-a357-1647ce848ea2
J-B-Mugundh/LeetCode-Solutions
2606-difference-between-ones-and-zeros-in-row-and-column/2606-difference-between-ones-and-zeros-in-row-and-column.cpp
class Solution { public: vector<vector<int>> onesMinusZeros(vector<vector<int>>& grid) { int m = grid.size(); int n = grid[0].size(); vector<int> onesRow(m, 0); vector<int> zerosRow(m, 0); vector<int> onesCol(n, 0); vector<int> zerosCol(n, 0); ...
ALGO
0.999912
6.377885
{ "github_metadata": { "branch": "main", "commit_count": 1277, "repo_created_at": "2023-08-08T16:22:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4aba23941...
95627f08-c73d-4d72-b22e-447b27d93af3
Infernos1153/cop3014
cop3014/hw5/chat_arrays.cpp
#include <iostream> using namespace std; // Function Prototypes void readArray(double array[], int &size); void printArray(const double array[], int size); int linearSearch(const double array[], int size, int key, int startPosition); void insertValues(double array[], int &size, int startNum, int searchKey); int remove...
ALGO
0.999854
5.155001
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-11-08T18:08: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": "2d81cee0b0c9...
b3f987eb-f34d-40d5-97c6-46d31501de09
keshab051/Quiz-game-using-cpp
main.cpp
#include <iostream> // Used for input and output operations (e.g., cin, cout). #include <vector> // Used for the vector container, which holds a collection of questions. #include <string> // Used for the string class to handle text data. #include <fstream> // Used for file input...
ALGO
0.997398
6.968441
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-08-03T13:41: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": "7183fb848a5...
6efe7f76-980a-4e84-8b26-17ecc7bc0949
thisisaman408/DSA
DSAinC++/Leetcode/leetcode3244.cpp
#include <iostream> #include <vector> #include <queue> #include <climits> using namespace std; vector<int> shortestPath(int n, vector<vector<int>>& queries) { vector<vector<pair<int, int>>> adjList(n); vector<int> answer; for (int i = 0; i < n - 1; ++i) { adjList[i].emplace_back(i + 1, 1); } ...
ALGO
0.999896
5.379362
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-07-27T11:47:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbe23902bb2...
31d57538-cff9-4ad3-b7ae-5dcc8b045682
lxb11/Algorithm
leetcode/bubbleSort.cpp
/************************************************************************* > File Name: bubbleSort.cpp > Author: > Mail: > Created Time: 2018年07月21日 星期六 23时29分10秒 ************************************************************************/ #include<iostream> using namespace std; void swap(int &a, int &b) { in...
ALGO
0.999767
4.978237
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-03-24T03:23: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": "530dafa6d...
c83c1322-fb26-4ecc-a680-1d0d2432231b
brandonrc/ExpressLRS-TBS
Source Files/FHSS/random.cpp
#include "random.h" static unsigned long seed = 0; // returns values between 0 and 0x7FFF // NB rngN depends on this output range, so if we change the // behaviour rngN will need updating long rng(void) { unsigned long m = 2147483648; long a = 214013; long c = 2531011; seed = (a * seed + c) % m; r...
TOOL
0.934254
4.775747
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-10-19T02:03:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "b1887518c897...
3639dbb7-6def-43c1-84ea-e80b02460bab
dldmldlsy/DataStructure_2021_Spring
Week3_Stack/jemin7709/3-2.cpp
#include <iostream> #include <string> using namespace std; // 노드 클래스(Stack 클래스를 friend 함수로 가짐) class Node { private: int data; Node* next; friend class Stack; }; //Stack클래스 class Stack { private: Node* head; // 맨 위를 가리키는 포인터 int Size; // 스택의 크기 public: Stack() :head(NULL), Size(0) {}; // head를 NULL로 Size를 0으로 초...
ALGO
0.999938
4.434281
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2021-03-31T09:06: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": "6cb93cc3335...
d09fe434-184c-459e-a7ee-0d2a405c5844
JatinSinghBisht01/ADA-Assignments
assg5/sortsquarearray.cpp
// Given a sorted array A containing N integers both positive and negative. // You need to create another array containing the squares of all the elements in A and return it in non-decreasing order. // Write a Python program to implement this in O(N) time. // Example Input // Input 1: // A = [-6, -3, -1, 2, 4, 5] //...
ALGO
0.999878
5.593387
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-04-27T18:25:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a05e0f901be...
6e43ab36-1a78-4c21-8667-f336eea79aa8
azbyx/ip_filter
main.cpp
#include <cstdlib> #include <iostream> #include <string> #include <vector> #include <algorithm> #include <iterator> #include <experimental/iterator> #include "ip_filter.h" int main(int, char const **) { try { std::vector<std::vector<uint32_t> > ip_pool; ipv4_validate validatorIP; ipv4...
TOOL
0.97469
4.212674
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2020-10-03T13:14:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fc53971611...
0f6bf860-7097-4a8f-996e-ec388cd8bdcd
nguyencongvan10022002/CTDL_GTH
codeptit/hinh_chu_nhat_lon_nhat.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long main(){ int t; cin >> t; while(t--){ int n; cin >> n; ll a[n + 5] = {0}; ll res = 0; for(int i = 1; i <= n; i++) cin >> a[i]; for(int i = 0; i <= n; i++){ int cnt = 1; ll ans = 0; ...
ALGO
0.999952
3.874859
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-08-23T03:23: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": "a3bf7559b9b8...
ec6d4ca5-ba43-4fe8-a285-d8b21e03c493
rdkit/rdkit
Code/GraphMol/MolDraw2D/DrawMolMCHLasso.cpp
// // Copyright (C) 2023 <NAME> and other RDKit contributors // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // // This is based on a suggest...
TOOL
0.933879
5.054166
{ "github_metadata": { "branch": "master", "commit_count": 8182, "repo_created_at": "2013-05-12T06:19:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3003, "forks": 931, "issues": 110, "pull_requests": 25 }, "file_meta": { "content_id": "...
91894eee-8142-42d5-9d1b-b7cad1b99a41
monkeyKing001/Algorithm_exercise
dokwak/1B_min_span/1043/1043.cpp
#include <bits/stdc++.h> using namespace std; int sol = 0; int n, m; int peopleCount; int partyCount; int truthCount; vector <int> truth; vector<int> parent(55, -1); int find_p(int u){ if (parent[u] == -1) return u; return find_p(parent[u]); } void union_u_v(int u, int v){ int p_u = find_p(u); int p_v = find_p...
ALGO
0.998751
3.777195
{ "github_metadata": { "branch": "main", "commit_count": 302, "repo_created_at": "2022-07-13T10:28:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ef29bf2878...
cc2a23e9-a9e5-4b36-975b-4dd3fa14ce5a
frazeeat/CPP-Workspace
chapter_ten/mastermind/mastermind/game.cpp
#include <iostream> #include <algorithm> #include <vector> #include "game.h" std::vector<int> combo_vector(int a, int b, int c, int d){ //Creates a vector from four ints written in. //We are going to assume that the numbers will always be // between 0 and 9. std::vector<int> combo{ d, c, b, a }; return combo; } ...
ALGO
0.999222
4.085462
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2015-07-23T01:13: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": "c08717c3b...
e8248750-42ac-4397-9b85-25ab271ba8bd
metaflow/contests
atcoder/agc32/c.cc
#if defined(LOCAL) const double _max_double_error = 1e-9; #include "testutils.h" #define L(x...) (debug(x, #x)) #define I(x, ...) (x) #define C(x...) CHECK(x) #else #define L(x, ...) (x) #define I(x, ...) (x) #define C(x, ...) ; #endif #include <math.h> #include <algorithm> #include <bitset> #include <chrono> #include ...
ALGO
0.999985
4.961545
{ "github_metadata": { "branch": "master", "commit_count": 415, "repo_created_at": "2014-05-12T04:59:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37666bdc...
712d4377-2180-41bc-8a9d-a0dcd09afce6
Quankee1/Laboratory-reports
Интерполяционный поиск/mian.cpp
#include <iostream> #include <chrono> using namespace std; int interpolationSearch(const int arr[], int n, int key) { int left = 0; int right = n - 1; while (left <= right && key >= arr[left] && key <= arr[right]) { int pos = left + ((key - arr[left]) * (right - left)) / (arr[right] ...
ALGO
0.999718
5.417841
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-10-20T15:22: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": "bce47484e008...
c33529bb-bf36-4a39-9da0-4d62fefd6d44
ichigo100percent/2D-
CommandPattern/소스2.cpp
#include <iostream> #include <memory> #include <stack> #include <unordered_map> #include <vector> using namespace std; class Weapon { public: Weapon() = default; virtual ~Weapon() = default; virtual void Attack() abstract; }; class Sword : public Weapon { public: using Weapon::Weapon; virtual ~Sword() = defaul...
TOOL
0.963088
4.975548
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2024-05-28T03:58:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a287aa2b8...
56b80edd-b82a-4362-9db7-2621d754ed48
Falcon-09/Leetcode-Problems
Snake and Ladder Problem - GFG/snake-and-ladder-problem.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: int minThrow(int n, int arr[]){ // code here vector<int> con(31,-1); for(int i=0;i<2*n;i+=2){ ...
ALGO
0.999246
4.484472
{ "github_metadata": { "branch": "main", "commit_count": 314, "repo_created_at": "2022-10-14T07:53:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5c6a8f0d8...
5a2f80d7-7826-4dea-9850-6bda7708047d
hoanxuanbach/Competitive-Programming
OI/USACO/2017/grass.cpp
//#pragma GCC optimize("Ofast,unroll-loops") //#pragma GCC target("avx,avx2,fma") #include<bits/stdc++.h> using namespace std; #define maxn 200005 #define pii pair<int,int> struct ed{ int u,v,w; bool operator<(ed o){return w<o.w;} }; int par[maxn],r[maxn],c[maxn],n,m,k,q,p[maxn],len[maxn],t[maxn]; vector<pii> e...
ALGO
0.999993
4.231716
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2025-04-19T03:31:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c3b6d5c0b8...
d32db4b1-58dc-4c50-82cc-0da0161296fb
saifur-shamim/Atcoder-Solution
484558 271A.cpp
///<NAME> ///Happy Coding #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long int li; typedef double dl; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef vector<pii>vpi; typedef vector<pll> vpl; #define PB push...
ALGO
0.999812
4.085823
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-01-23T05:59: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": "7fd068b738c...
0d2fa82f-dbd9-466c-9756-86e0dffd9b40
timniederhausen/gn
src/base/strings/string_split.cc
// Copyright (c) 2012 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/strings/string_split.h" #include <stddef.h> #include "base/logging.h" #include "base/strings/string_util.h" #include "base/third_part...
TOOL
0.984694
7.284693
{ "github_metadata": { "branch": "master", "commit_count": 2223, "repo_created_at": "2016-05-01T16:45:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 131, "forks": 54, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "aa84...
f1305431-b642-43a1-89ab-2b1542f87902
xray-group/mstruct
static-libs/include/scitbx/math/basic_statistics.h
#ifndef SCITBX_MATH_BASIC_STATISTICS_H #define SCITBX_MATH_BASIC_STATISTICS_H #include <scitbx/array_family/misc_functions.h> #include <scitbx/array_family/ref.h> #include <scitbx/math/accumulators.h> #include <cmath> #include <cstddef> namespace scitbx { namespace math { //! Collection of basic statistics such as...
ALGO
0.964759
7.472289
{ "github_metadata": { "branch": "master", "commit_count": 294, "repo_created_at": "2017-10-18T21:10:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5c4bf80fe...
a17bb05b-1c06-4f1d-a55e-7165a04fdca2
bolverk/huji-rich
source/newtonian/three_dimensional/Ghost3D.cpp
#include "Ghost3D.hpp" #include "../../misc/utils.hpp" Ghost3D::~Ghost3D(void) {} vector<std::pair<size_t, size_t> > Ghost3D::GetOuterFacesIndeces(Tessellation3D const& tess)const { size_t N = tess.GetTotalFacesNumber(); size_t Npoints = tess.GetPointNo(); vector<std::pair<size_t, size_t> > res; for (size_t i = 0...
ALGO
0.993534
5.11539
{ "github_metadata": { "branch": "master", "commit_count": 2499, "repo_created_at": "2015-03-13T06:09:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 10, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "53128...
5b2b17c3-e4f1-43a1-a9b8-690decf09d78
CptKappa/qiskit-api-cpp
QMapper/mArchitecture.h
#ifndef MARCHITECTURE_H #define MARCHITECTURE_H #include <map> #include <list> #include <tuple> #include <iostream> #include <queue> #include <boost/graph/graph_traits.hpp> #include <boost/graph/undirected_graph.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/directed_graph.hpp> #include <boost/g...
ALGO
0.907465
3.039443
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-08-03T08:11:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d5a09788d...
4ec32627-30a1-4e3c-895e-9cd19cd5dc56
Preacher98/Prog-UniCT
C++/Esercitazione/esame2/double_linked_list.h
#pragma once #include<iostream> #include<string> #include"classes.h" using namespace std; template<typename T> class Nodo { private: Nodo<T>* next=nullptr; Nodo<T>* prev=nullptr; T* mezzo; public: Nodo<T>* getNext(){return next;} Nodo<T>* getPrev(){return prev;} veicolo* getMezzo(){return mezz...
ALGO
0.946221
3.857871
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-10-30T16:18:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc4063226674...
cc311b76-5a8b-4559-a152-2b45f9f8d182
ARahmanAR/Cpp-learning
2dArrays/output.cpp
#include <iostream> using namespace std; int main() { int arr[2][3]; arr[0][0] = 1; arr[0][1] = 2; arr[0][2] = 3; arr[1][0] = 4; arr[1][1] = 5; arr[1][2] = 6; // for (int i = 0; i < 2; i++) // 2 rows // { // for (int j = 0; j < 3; j++) // 3 columns // { // ...
ALGO
0.985213
3.47901
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-05-21T08:55: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": "31034cdc88e...
eb097cd9-1ab2-45ba-98f7-207583e49700
NamWoo/isaac-sdk-20201201-427971df2
engine/engine/gems/algorithm/tests/bipartite_graph_matching.cpp
/* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. NVIDIA CORPORATION and its licensors retain all intellectual property and proprietary rights in and to this software, related documentation and any modifications thereto. Any use, reproduction, disclosure or distribution of this software and related docum...
TEST
0.953912
6.89402
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-12-29T09:44:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8962f10d3c50...
0d594637-2012-410a-aabb-a31d05b705a0
akanksha606/Codeforces
Ladder 2-A/Problems 40-47/45.Supercentral point.cpp
//Supercentral point(c++) #include <bits/stdc++.h> #include<string.h> typedef long long int ll; #define COOL std::ios::sync_with_stdio(false); cin.tie(NULL); #define pb push_back #define mp make_pair #define fi first #define se second #define SORT(v) sort(v.begin(), v.end()) #define REVERSE(v) reverse(v.begin(), v.end(...
ALGO
0.999861
3.799919
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2020-01-25T19:16: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": "1d0224eae...
2eaa638f-2db3-4a38-b071-e2914a64cf47
kjnh10/pcw
work/atcoder/arc/arc099/F/answers/725917_ildargainull.cpp
#include <cmath> #include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <map> #include <list> #include <time.h> #include <math.h> #include <random> #include <deque> #include <queue> #include <cassert> #include <unordered_map> #include <unordered_set> #include <iomanip> #inc...
ALGO
0.999976
3.71088
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2018-05-23T15:03:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9229dd9f0...
e51e0e11-bdf4-4bfb-8844-62f7718d4606
matoous/CTU-codes
PSI/Server/Server/rsa.cpp
//============================================================================ // Name : rsa.cpp // Author : // Version : // Copyright : SkliF // Description : Hello World in C++, Ansi-style //============================================================================ #include "rsa.h" #include <iost...
ALGO
0.998838
4.475039
{ "github_metadata": { "branch": "master", "commit_count": 328, "repo_created_at": "2017-02-25T12:49:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 5, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "2ac0524...
c20d151c-569c-4e8b-a508-638126491cf0
hpsaturn/arduino-popbot
examples/Rectangle_Running/src/Rectangle_Running.ino
/******************************************************************************* * Robo-Spinner V1.0 * Filename : Rectangle_Running.pde * Running 90 Degree Turnleft And Turnright ********************************************************************************/ int MAX_CICLES=3; int cicles=0; void setup(){ pinMode(3...
ALGO
0.978731
5.885229
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2014-10-18T04:42:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc9ff7b6d...
55538df1-b4bd-42e2-b7f6-73a035f7208a
CyborgSquirrel/CS-UBB-2021-2024
A1S2 Structuri de Date și Algoritmi/06_tema/MD.h
#pragma once #include<vector> #include<utility> using namespace std; typedef int TCheie; typedef int TValoare; extern const TCheie NIL; extern const TCheie ERASED; typedef std::pair<TCheie, TValoare> TElem; class IteratorMD; class IteratorValori; class MD { friend class IteratorMD; friend class IteratorValori; ...
TOOL
0.969361
4.315315
{ "github_metadata": { "branch": "master", "commit_count": 156, "repo_created_at": "2021-10-05T07:04:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17ec2755...
6bb7afab-b8d2-4602-a102-4ff924b8fb5b
Donggeun-Lim3/ICS3U-Unit6-05-CPP
average_of_mark.cpp
// Copyright (C) 2002 <NAME> All rights reserved. // // Created by: <NAME> // Created on: Jan 2021 // This program calculates average of mark #include <iostream> #include <list> main() { // this function uses a list to calculate the average of marks std::list<float> marks; float tempMark; float ave...
TOOL
0.972299
3.045393
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-01-20T00:34: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": "54321f0cadfe...
cf243fc7-c3a0-4abf-b2f9-317cc6fa1e56
alexbaryzhikov/codebase-archive
Cpp/MakePicture/DrawLine.cpp
// drawline.cpp #include <cstdio> #include <cstdlib> #include <iostream> #include <windows.h> #include <conio.h> #include <math.h> #include "DrawLine.h" using namespace std; struct Console { HANDLE hstdout; CONSOLE_SCREEN_BUFFER_INFO csbi; CONSOLE_CURSOR_INFO cursorInfo; ...
ALGO
0.964586
4.820841
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2017-10-13T16:10:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f44a9a0ad...
3f73ccdf-f288-4746-9b15-4c3ef5809f52
mukuldeep/cs
cp/CodeForces/cdfr_3C.cpp
/* * Created by me on 11-09-2021. */ #include <bits/stdc++.h> #define Sync ios_base::sync_with_stdio(false); cin.tie(nullptr);pre();ll t=1;// I t; #define Dr int main(){Sync W(t)soln(t);return 0;} #define Drt int cc_main(){Sync W(t)soln(t);return 0;} #define F(a,c) for (ll a=0;a<c; a++) #define Fe(a,c) for(ll a=0;a<...
ALGO
0.999973
3.578158
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2021-05-31T12:51: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": "450bb5c9051...
cb4f36f1-1363-4198-b0c5-79a0bfc9823e
adithyabhat99/competitive_coding
DP/perfect_sum.cpp
//https://www.geeksforgeeks.org/perfect-sum-problem-print-subsets-given-sum/ #include<bits/stdc++.h> using namespace std; void display(vector<int>v) { for(auto x:v) cout<<x<<" "; cout<<endl; } void printSubs(int S[],bool **X,int n,int sum,vector<int>v) { if(n==0) return; if(n==1 && sum!=0 && X[1...
ALGO
0.99987
3.793284
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2018-11-23T17:24: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": "5b846d3dd...
8764ebb8-cac0-4611-adbe-68e0ce3ef354
Zishan-Alam/LeetCode
Heap/0692-top-k-frequent-words.cpp
// Time Complexity: O(n + m log k + k log k), where m --> number of unique words in map // Space Complexity: O(m + k), where m --> number of unique words in map, k --> size of heap and input class Solution { public: typedef pair<int, string> P; // {frequency, string} // Custom comparator lambda jo min-heap c...
ALGO
0.999982
6.876891
{ "github_metadata": { "branch": "main", "commit_count": 560, "repo_created_at": "2024-09-26T11:58:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ae7788b3d...
bf0c8171-8f4b-4310-85be-ee6b0d73a01d
phucisstupid/cpp
de hsg/GBOM.cpp
#include <iostream> #include <algorithm> char a[1000][1000]; int n, m, k; using namespace std; bool xuly(char b[][1000], int l) { char c[1000][1000]; for (int i=1; i<=n; i++){ for (int j=1; j<=m; j++) { c[i][j]= b[i][j]; } } int bom=0; for(int ...
ALGO
0.999955
3.997258
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-02-04T06:48:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3674d432f3c...
82663300-c81c-4ba7-b3fe-85d56841be1d
liangzhongkai/CplusplusCodeEx
acm/0 数据结构/线段树/区间合并(覆盖标记+段头查询) poj3667/poj3667.cpp
//* 2228K 625MS C++ 2022B #include <cstdio> #include <cstring> #include <cctype> #include <algorithm> using namespace std; #define max(a, b) ((a)>(b)?(a):(b)) #define lson l , m , rt << 1 #define rson m + 1 , r , rt << 1 | 1 const int maxn = 55555; int lsum[maxn<<2]; // lsum[rt]表示从m=(l+r)>>1向左有连续的多少个空位 int...
ALGO
0.999974
3.959943
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2015-11-05T12:47:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a012816d...
c62ba8e4-a32b-4e1d-b410-19df85113304
mywang99/ByMI
geom_solver_C.cpp
/** * @file geom_solver_C.cpp * @author <NAME> * @email qianchd at gmail dot com * @version 1.0 * @date 2022-10-28 * @brief geometric median * @details * @see some url * @note some remark */ // we only include RcppArmadillo.h which pulls Rcpp.h in for us #include <RcppArmadillo.h> #include <iostream> // ...
ALGO
0.99997
5.74305
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-05-20T13:01:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ac187cdbc5d...
81c847fc-dba3-43b6-b5d1-18967558c48f
BioMedIA/MIRTK
Modules/Image/src/ConnectedComponents.cc
/* * Medical Image Registration ToolKit (MIRTK) * * Copyright 2013-2015 Imperial College London * Copyright 2013-2015 <NAME> * * 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 * * ...
ALGO
0.933961
7.431981
{ "github_metadata": { "branch": "master", "commit_count": 2061, "repo_created_at": "2016-01-03T22:25:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 197, "forks": 71, "issues": 64, "pull_requests": 3 }, "file_meta": { "content_id": "8ff7...
ff76be3d-06eb-4657-973f-ece93585245e
bruce1408/Alogrithm_Datastruct
String/709_To_Lower_Case.cpp
#include <iostream> #include <vector> #include <set> using namespace std; /** * Implement function ToLowerCase() that has a string parameter str, * and returns the same string in lowercase. * * Example 1: * Input: "Hello" * Output: "hello" * * 把字符串的大写转换成小写字母即可; */ /** * 方法 1,就是利用ascii码,小写字母的范围是在97-122之间...
ALGO
0.967928
4.614536
{ "github_metadata": { "branch": "master", "commit_count": 1617, "repo_created_at": "2018-04-04T09:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38de05a...
eb4c590b-a280-44bb-bd55-606c1d8a02ec
blue-rock/Coding-solutions
86-partition-list/86-partition-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* partition(L...
ALGO
0.999991
5.44854
{ "github_metadata": { "branch": "main", "commit_count": 1057, "repo_created_at": "2022-05-19T11:03: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": "42410910b...
37ce8239-a6fa-4b1d-917b-1135fbd64103
cznull/quantum
qustate/qustate.cpp
// flucpu256.cpp : Defines the entry point for the application. // #include "resource.h" #include <windows.h> #include <stdlib.h> #include <malloc.h> #include <memory.h> #include <tchar.h> #include <gl/glew.h> #include <math.h> #include <stdio.h> #include <immintrin.h> #include <time.h> #include "vec.h" #include "qust...
ALGO
0.95628
3.460205
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-03-26T13:30: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": "4080966638...
2165d702-5bf9-402c-8f4f-c1334db34156
vancegroup-mirrors/sofa-framework
Sofa/modules/sofa/component/linearsolver/PrecomputedLinearSolver.h
/****************************************************************************** * SOFA, Simulation Open-Framework Architecture, version 1.0 RC 1 * * (c) 2006-2011 MGH, INRIA, USTL, UJF, CNRS * * * ...
TOOL
0.931578
6.494111
{ "github_metadata": { "branch": "master", "commit_count": 2616, "repo_created_at": "2013-03-26T20:22:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4291a7f...
8cee4cbe-8a2f-47d4-bdab-f3258f691acd
steinraf/sakura
src/acceleration/bvh.h
// // Created by steinraf on 23/10/22. // #pragma once #include "aabb.h" #include "../bsdf.h" #include "../emitters/areaLight.h" #include "../emitters/environmentEmitter.h" #include "../hittable.h" #include "../medium/medium.h" #include "../utility/ray.h" struct AccelerationNode { __device__ __host__ constexpr ...
ALGO
0.981828
5.235554
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2022-10-22T17:33:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91eaf3ba460...
eb080f30-9b46-4ed1-b360-8dfb8ba33a2d
AyushMaheshwari2002/LeetCode
0932. Beautiful Array.cpp
/* An array nums of length n is beautiful if: * nums is a permutation of the integers in the range [1, n]. * For every 0 <= i < j < n, there is no index k with i < k < j where 2 * nums[k] == nums[i] + nums[j]. Given the integer n, return any beautiful array nums of length n. There will be at le...
ALGO
0.999949
5.568307
{ "github_metadata": { "branch": "main", "commit_count": 1346, "repo_created_at": "2022-01-15T03:47: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": "28423a32c...
96c4e4ce-d0d2-4ab3-b607-2074bbd35818
ishandutta2007/codeforces-s
somuchdrama/normal/1375/F.cpp
#include <bits/stdc++.h> using namespace std;using ll=long long;using uint=unsigned int;using pii=pair<int,int>;using pll=pair<ll,ll>;using ull = unsigned long long;using ld=long double;template<typename T>void _(const char*s,T h){cerr<<s<<" = "<<h<<"\n";}template<typename T,typename...Ts>void _(const char*s,T h,Ts...t...
ALGO
0.999919
4.546103
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "001feae07e92...
85ea9fdd-6c4d-479a-a49f-e838cc6a6582
aesma3il/Problem-Sovling-Practices
0096_CircularQueueUsingArray/Source.cpp
#include <iostream> #define MAX_SIZE 100 class CircularQueue { private: int arr[MAX_SIZE]; int front; int rear; public: CircularQueue() { front = -1; rear = -1; } bool isEmpty() { return (front == -1 && rear == -1); } bool isFull() { return ((rear + 1...
ALGO
0.998314
5.924784
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2024-06-26T22:25: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": "4171cb94f5...
6924506d-796a-4c03-8bad-045874053b8d
woshixty/Data-Structure-And-Algorithm_STUDY
图/数组表示法/Vertex.cpp
#include <iostream> #include<string.h> using std::cin; using std::cout; using std::endl; #define INFINITY 0 //两个顶点之间无边或弧时的数值 #define MAX_VERTEX_NUM 26 //最大顶点个数 #define MAX_INFO 10 //弧相关信息的字符串的最大长度 #define TRUE 1 #define FALSE 0 #define ERROR 0 #defin...
ALGO
0.996614
3.959623
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2020-08-02T11:43: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": "85b3a5e2e...
2fb3a3b1-24aa-4267-9f0f-d5771611cfa2
ankitsaini84/DS-Algos
Binary Tree/Maximum_Depth.cpp
/** * Given the root of a binary tree, return its maximum depth. * A binary tree's maximum depth is the number of nodes along the longest path from * the root node down to the farthest leaf node. * * EXAMPLE: * Input: root = [3,9,20,null,null,15,7] * Output: 3 * * CONSTRAINTS: * The number of nodes in the t...
ALGO
0.999996
7.013529
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2020-12-24T12:11: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": "cdc7f467...
be9615d7-db5d-473e-b40b-3a78a2de7950
mavs7347/Conversor1
Conversor.cpp
#include <iostream> #include <string.h> #include <math.h> using namespace std; class Converter { private: int decimal = 0; string binary = ""; public: void setDecimal(int _decimal) { this->decimal = _decimal; decimalBinary(this->decimal); cout << "\nDe...
ALGO
0.956816
4.45746
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-10-04T03:46: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": "b74e6ccb50...
237af00f-b32a-4d55-885e-0c1dd7e63651
michaelschaub/PartitionStability
Normalised/community.h
#ifndef COMMUNITY_H #define COMMUNITY_H #include <stdlib.h> #include <stdio.h> #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <map> #if defined(_WIN32) || defined(WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(WIN64) || defined(__WIN64__) || defined(_WINDOWS) || d...
ALGO
0.994795
5.516743
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2012-08-31T12:56:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7965e4a...
df485f75-98ee-44ba-b017-830ec990877f
dudnbubn/ProblemSolving
BOJ1000-9999/BOJ2563_ColoredPaper.cpp
// 처음엔 총 색종이의 넓이에서 겹치는 부분을 빼주는 방법으로 풀었더니 틀린 답이 나왔다.. // 이미 빼준 부분에 대해 또 빼준 것이 문제였다. ex) input : 3 0 0 1 1 2 2 // 결국 (0, 0) ~ (99, 99) 까지 칠해진 부분을 체크하여 총 개수를 구하는 방법으로 풀었다. #include <iostream> using namespace std; bool paper[111][111] = { 0, }; int main() { int n, r, c; cin >> n; for (int i = 0; i < n; i++) { cin >...
ALGO
0.997941
3.63975
{ "github_metadata": { "branch": "main", "commit_count": 858, "repo_created_at": "2021-07-23T01:59: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": "f03df4dc5d...
244b18df-62b5-4e1c-9be7-0b69b21def67
ZealACMer/Algorithm
队列/circularQueue.cc
//循环队列 #include <iostream> class Queue { public: Queue(int size = 10) : cap_(size) , front_(0) , rear_(0) , size_(0) { pQue_ = new int[cap_]; } ~Queue() { delete[] pQue_; pQue_ = nullptr; } //入队O(1) void push(int val) { ...
ALGO
0.965961
4.360705
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2024-05-10T07:42:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab37e5dbc31...
9ab5535a-f3ed-4671-98f4-b02f04ecc358
StevenMallqui/Algorithmic-Methods
WeightedDirectedGraphs-DijkstraAlgorithm/CualEsElMejorCamino/main.cpp
/*@ <answer> * * Nombre y Apellidos: <NAME> * *@ </answer> */ #include <iostream> #include <fstream> #include <limits> #include <queue> using namespace std; #include "DigrafoValorado.h" // propios o los de las estructuras de datos de clase #include "IndexPQ.h" /*@ <answer> Escribe aquí un comentario general...
ALGO
0.999925
4.679877
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-09-23T16:33: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": "4a3c42a49df...
d84b89c1-dc53-4ae2-ab4d-1840ee90a608
yults/Cpp
БДЗ/8-puzzle/src/board.cpp
#include "board.h" #include <iostream> #include <random> #include <algorithm> #include <utility> Board Board::create_goal(const unsigned size) { std::vector<std::vector<unsigned>> temp(size, std::vector<unsigned> (size)); for (unsigned i = 0; i < size; i++) for (unsigned j = 0; j < size; j++) ...
ALGO
0.9987
5.097656
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-06-30T17:05: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": "92069df6f3...
fb6660f0-fe22-4745-9a6c-431fe70bb3b8
ysqm/Code
Qbank/Question Bank 2020 - 8 - 15 ————/2020-8-28/P2294 [HNOI2005]狡猾的商人.cpp
# include <cstdio> # include <cstring> # include <queue> # define reg register # define N 5000 inline int Read() { register int x = 0,f = 1;char ch = getchar(); while(ch < '0' || ch > '9'){if(ch == '-') f = -1;ch = getchar();} while(ch >= '0' && ch <= '9'){x = x*10+(ch^48);ch = getchar();} return f ...
ALGO
0.999848
3.881889
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-08-19T09:25:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9046f9b4a...
067ded99-4d51-48ce-9d24-247c3cf9ab48
kagasan/atcoder
NAIST/NAIST1029/3.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<ll, ll> P; #define rep(i, n) for(ll (i) = 0; (i) < (n); (i)++) #define rep1(i, n) for(ll (i) = 1; (i) <= (n); (i)++) #define rrep(i, n) for(ll (i) = (n) - 1; (i) >= 0; (i)--) #define rrep1(i, n) for(ll (i) = (n); (i) >= 1; (i)--) const ll ...
ALGO
0.9998
3.828549
{ "github_metadata": { "branch": "master", "commit_count": 326, "repo_created_at": "2019-04-02T13:31:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbfefbde...
b89ee9fe-c99c-4d14-b962-8baabb6d818d
Jeanmilost/Demos
Visual Studio/Others/GJK/GJK_3D/SDK/Colliders/DWF_AABBTree.cpp
/**************************************************************************** * ==> DWF_AABBTree --------------------------------------------------------* **************************************************************************** * Description: Aligned-Axis Bounding Box tree * * Devel...
ALGO
0.999527
7.11715
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2018-11-06T21:08:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a6f85fad...
c8e62dd5-edc0-42a8-8fc0-bbfa61b8287f
CXYhh121/CPlusPlus
搜索算法9_1/LeetCode9_1/BFS.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <unordered_set> #include <string> #include <queue> using namespace std; //单词接龙 /* 1.通过BFS, 首先用beginWord带出转换一个字母之后所有可能的结果 2.每一步都要把队列中上一步添加的所有单词转换一遍,最短的转换肯定在这些单词当中, 所有这些词的转换只能算一 次转换,因为都是上一步转换出来的,这里对于每个单词的每个位置都可以用26个字母进行转换,所以一个单词一次转换 的可能有:单词的长度 * 26 3.把转换成功的新词...
ALGO
0.999904
4.829004
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2019-01-15T12:12:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a78733444...
6b77fd14-eaef-4426-b1d4-15b2c0d3628a
Tempostyle/maze_finder
main.cpp
#include <iostream> #include <cstdlib> #include <vector> #include <stack> #include <queue> #include <fstream> #include <string> #include <ostream> #include <sstream> #include "StringSplitter.h" #include "Cell.h" using namespace std; char yes = 'y'; char wall = '#'; char start = 'o'; char end = '*'; char space = '.'; ...
TOOL
0.987564
3.816392
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-02-12T19:06: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": "70aaabe0ea...
32fedab4-6f2e-47cd-9fa3-38cb3f0c8526
cldelahan/algorithms
src/set/set.cpp
#include <algorithm> #include <set> #include <vector> #include <iostream> #include "set.h" namespace Set { /** * @brief From a set, returns a vector of all unique subsets of size n * * @param set The set * @param n The size of each returned subset * @return std::vector<std::set<int>> The ...
ALGO
0.947809
6.822841
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2021-11-13T19:42:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e4fa5af2...
b1bcdee7-68de-4976-a713-c340309bda9b
tangjz/acm-icpc
lydsy/3132.cpp
/* * 二维树状数组解决矩形修改、求和 */ #include <cstdio> const int maxn = 2049; int n, m, bit[maxn][maxn][4]; inline void swap(int &x, int &y) { int t = x; x = y; y = t; } void add(int x, int y, int val) { for(int i = x; i <= n; i += i & -i) for(int j = y; j <= m; j += j & -j) { bit[i][j][0] += val; bit[i][j][1] += val *...
ALGO
0.999362
3.30769
{ "github_metadata": { "branch": "master", "commit_count": 293, "repo_created_at": "2013-10-06T18:57:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 45, "forks": 13, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "2bf97a...
4bcdad87-6ad7-4f9c-a3f8-40ceea8f6205
ruchirrg07/OATCP
MaximumIceBars/main.cpp
#include<bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define ll long long #define mod 1000000007 // const int N = 1e7+10; // ll hsh[N]; int maximumIceBars(vector<int> &costs, int coins) { sort(costs.begin(), costs.end()); int ans = 0; for (auto i...
ALGO
0.999805
4.686576
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-03-14T07:20:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c3d5682e9bf...
13372a23-b586-43fa-bbdd-7928f7c911ff
satoshi-ota/pyramid_robotics
pyramid_control/include/pyramid_control/tension_optimizer.h
#ifndef PYRAMID_CONTROL_OPTIMIZER_H #define PYRAMID_CONTROL_OPTIMIZER_H #include <Eigen/Core> #include <ros/ros.h> #include <ifopt/variable_set.h> #include <ifopt/constraint_set.h> #include <ifopt/cost_term.h> namespace ifopt { using Eigen::Vector2d; class ExVariables : public VariableSet { public: ExVariable...
ALGO
0.975488
5.643224
{ "github_metadata": { "branch": "master", "commit_count": 215, "repo_created_at": "2019-07-11T04:24:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e3c04f0...
1838a1c5-be79-4ab4-915e-0bec9b89719f
ranjodhsingh1729/CodeForces-Solutions
Archives/Marked/1669H.cpp
#include <bits/stdc++.h> #define MAXLEN 100000 #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) #define FIXIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); using namespace std; typedef long long ll; const ll INF = 0x3f3f3f3f3f3f3f3f; void fileio() { #ifndef O...
ALGO
0.999972
5.053915
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-04-05T10:27: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": "2f75c1f43e5f...
4c2cdd94-3bce-470a-8af2-9dd2d3fa7803
strange-suraj/LeetCode-Susbmission
Rotate by 90 degree - GFG/rotate-by-90-degree.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to rotate matrix anticlockwise by 90 degrees. void rotateby90(vector<vector<int> >& matrix, int n) { // code here // if(n%2){ // for(int i=...
ALGO
0.99987
6.541276
{ "github_metadata": { "branch": "main", "commit_count": 3434, "repo_created_at": "2022-01-13T06:50:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25eae0050...
5a519e71-7928-4e29-b013-8d4f590cb2b2
thegamer1907/Code_Analysis
contest/1542501944.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define FR(i,a,b) for(int i=a; i<b; ++i) #define BR(i,a,b) for(int i=(b-1); i>=0; --i) #define FA(i,a) for(auto i : a) #define PB emplace_back #define trace(x) cerr<<#x<<":"<<x<<'\n'; #define trace2(a,n) { cerr<<#a<<" = "; FR(_,0,n) cerr << a[_] << ' ';...
ALGO
0.999956
3.346924
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-05-24T10:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2863df71...
a485ae4d-1622-45c7-8e0a-6cc19183bd57
lead-afk/Mandelbrot-set-explorer
mandel win/mandel win - Copy.cpp
#include <thread> #include <iostream> #include <vector> #include <SFML/Graphics.hpp> #include <mutex> #include <cmath> #include <boost/multiprecision/cpp_dec_float.hpp> using namespace boost::multiprecision; using namespace std; const int WIDTH = 900; const int HEIGHT = 900; cpp_dec_float_50 minx = -3; cpp_dec_fl...
ALGO
0.99852
3.890117
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-07-11T21:53: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": "db7caad43679...
832d23bf-3014-412c-a8e0-b5e3cca1a7d5
192211659/CSA0259-C-PROGRAMMING-FOR-GAME-DEVELOPERS
Day-2 Programe-11.cpp
#include <stdio.h> int main() { int arr[] = {10, 20, 30, 40, 50}; int n = sizeof(arr) / sizeof(arr[0]); int i, sum = 0; float average; // calculate the sum of the elements in the array for (i = 0; i < n; i++) { sum += arr[i]; } // calculate the average of the elements ...
ALGO
0.998849
4.252974
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-03-28T04:30: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": "6e15572bab9...
96c29c70-740e-400a-9009-34370f4d2a53
ginkgo/AMP-LockFreeSkipList
pheet/sched/Priority/PrioritySchedulerPlace.h
/* * PrioritySchedulerPlace.h * * Created on: 19.09.2011 * Author: <NAME> * License: Boost Software License 1.0 (BSL1.0) */ #ifndef PRIORITYSCHEDULERPLACE_H_ #define PRIORITYSCHEDULERPLACE_H_ #include <tuple> #include <random> #include <functional> #include "../../settings.h" #include "../common/CPUT...
TOOL
0.975837
6.250693
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2014-06-05T13:32:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "753acbaf9...
8b1355b5-a3e1-46d5-ae25-299dd90a9500
akshatsahu100/Coding-Docs
Graphs/bellman_ford.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define vvi vector<vector<int>> #define vp vector<pair<int,int>> #define vvp vector<vector<pair<int,int>>> #define vc vector<char> ll MOD = 1e9 + 7; double pi = 3.14159; void inp_vector(vi &a){ for(int i=0; i<(int)a.size(); i++)...
ALGO
0.999914
4.299626
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2021-06-17T16:52:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80f14bad1...
59b1d5bb-3da7-4ca6-8136-6261e84fc1aa
GRTLCollaboration/Chombo
releasedExamples/EBAMRINS/src/PoisselleTubeVelBC.cpp
#ifdef CH_LANG_CC /* * _______ __ * / ___/ / ___ __ _ / / ___ * / /__/ _ \/ _ \/ V \/ _ \/ _ \ * \___/_//_/\___/_/_/_/_.__/\___/ * Please refer to Copyright.txt, in Chombo's root directory. */ #endif #include "EBArith.H" #include "PoisselleTubeVelBC.H" #include "UsingNamespac...
ALGO
0.997614
6.445386
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2018-01-30T14:07:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 12, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5138037c9a...
2ecd409b-224e-4ee2-a9cc-3acc7c16561f
vinhphannn/TTUD
OnTap/bai_5_ChiaHaiDayConCoDoLechNhoNhat.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; pair<vector<int>, vector<int>> min_difference_partition(const vector<int>& A) { int n = A.size(); int sum = 0; for (int i = 0; i < n; i++) { sum += A[i]; } // Khoi tao DP vector<vector<bool>> dp(n + 1, vector<b...
ALGO
0.999974
4.717793
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-01-05T06:36:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a008b0af7...
46ed22bd-10f3-4804-8621-12912b66e229
Raj-3435/CppCodingQuesSoln
Week4/Day17/ques1.cpp
// Ques 1: Write a C++ code that take 2D array and key from user. Now you have to check that key exist inside the array or not if it exits print YES otherwise NO. #include <iostream> const int MAX_ROWS = 10; const int MAX_COLS = 10; bool findKeyInArray(int arr[MAX_ROWS][MAX_COLS], int rows, int cols, int key) { ...
ALGO
0.999234
5.542791
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-08-26T09:25:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "895a20e0234...
a8f0c3e3-29f7-40a9-9e74-7c7d729f9410
sca-research/rank-cpp-experiments
src/simulate-cpa.cpp
#include "CPA.hpp" #include "IO.hpp" #include <rankcpp/Dimensions.hpp> #include <rankcpp/Key.hpp> #include <rankcpp/ScoresTable.hpp> #include <CLI/CLI.hpp> #include <cstddef> #include <cstdint> #include <filesystem> #include <iostream> #include <random> namespace rankcpp { template <std::size_t ByteCount = 16> voi...
TOOL
0.965058
6.990103
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-05-22T19:55:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f8e16e21d5...
d0166c93-38da-4fa0-801a-df1adb1a5a80
dimensionentropy/Coursework
NTOU/2018/June/C++/BGIDemo/src/SineCountGraph.cpp
// cl /GX SineCount.cpp libbgi.lib gdi32.lib comdlg32.lib uuid.lib oleaut32.lib ole32.lib user32.lib // bgi SineCount.cpp // devcpp, -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 #include <stdio.h> #include <math.h> #include <conio.h> #include <graphics.h> #define PI 3.141592 void main(void) { int i, iCou...
ALGO
0.995221
4.544654
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-08-07T04:58: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": "15b88850a...
f0580ebe-ef61-4a49-94fb-c68cfffdda8e
zjy-dev/algorithm
LeetCode/812-最大三角形面积.cpp
#include "LeetCode.h" class Solution { public: double ans = 0; double area(int x1, int y1, int x2, int y2, int x3, int y3) { return 0.5 * abs(x1 * y2 + x2 * y3 + x3 * y1 - x2 * y1 - x3 * y2 - x1 * y3); } double largestTriangleArea(vector<vector<int>> &points) { int n = points.size(); for (int i =...
ALGO
0.999742
6.257329
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2021-11-29T14:17:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f0f20704...
4a368c2b-29d3-4c2e-a15a-81752627bd5f
souvikcode/LeetCode-May-Challenge-Solutions
Week 1 - Day 4.cpp
/* Problem Link : https://leetcode.com/explore/challenge/card/may-leetcoding-challenge/534/week-1-may-1st-may-7th/3319/ The main concept of the question is: To convert the given "num" to its Binary Equivalent,then flipping the bits of this binary equivalent and converting this resultant Binary Equivalent to its deci...
ALGO
0.999899
5.343814
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-05-04T09:53:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ac848f00...
27d09f42-a68b-469f-82e2-7836c145eaa8
ISJADE/Data_Structure_c
Stack/Squence_Stack.cpp
#include<iostream> #define MaxSize 10 typedef struct{ int data[MaxSize]; int top; //栈顶指针 }SqStack; void InitStack(SqStack &s){ s.top = -1; } bool IsEmpty(SqStack s){ if(s.top==-1) return true; else return false; } bool push(SqStack &s,int x){ if(s.top==MaxSize-1){ ...
ALGO
0.998557
3.82408
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-06-03T15:28: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": "2af717b6b6...
86fed937-324b-41ba-a76f-e3de1fa2638e
agul/contest-tasks
DSotsialnayaSet.cpp
#include "base/header.hpp" #include "collections/queue/queue.hpp" class DSotsialnayaSet { public: static constexpr bool kWriteCaseNumber = false; static constexpr bool kMultiTest = false; void solve(std::istream& in, std::ostream& out) { int n, m, t; in >> n >> m >> t; std::vector<int> times...
ALGO
0.999953
4.702146
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-04-26T23:57: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": "7084e05b7...
bf5c02f2-c037-4bef-b04a-c56238038a56
pacha2880/competitive_programming_codes
C. Longest Simple Cycle.cpp
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> #define mp make_pair #define pb push_back #define all(a) (a).begin(), (a).end() #define sz(a) (int)a.size() #define md(a, b) ((a) % b + b) % b #define mod(a) md(a, MOD) #define srt(a) sort(all(a)) #...
ALGO
0.999945
3.803996
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-10-18T22:33: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": "ec847f7ac35...
6d88f9ba-05ad-4877-8021-005b71d95960
cryptobiu/libscapi
lib/libOTe/libOTe/Tools/bitpolymul/transpose.h
#pragma once /* Copyright (C) 2017 <NAME> This file is part of BitPolyMul. BitPolyMul is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version...
ALGO
0.985082
3.152442
{ "github_metadata": { "branch": "master", "commit_count": 1244, "repo_created_at": "2016-03-06T08:59:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 185, "forks": 64, "issues": 11, "pull_requests": 3 }, "file_meta": { "content_id": "7023...
e905d44d-3dc1-4659-8ce3-0e350101f852
xvepkj/cp_files
uva/uhunt/429.cpp
#include <cstdio> #include<iostream> #include <cstring> #include <cassert> #include <cmath> #include <string> #include <algorithm> #include <vector> #include <queue> #include <bitset> #include <map> #include <set> using namespace std; typedef long long int ll; typedef vector< int > vi; typedef pair< int, int > ii; type...
ALGO
0.999559
3.417482
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-20T04:15:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f388bd54295...
54f765e6-b419-480a-bf4c-f94ec79fb912
Codave/LeetCode
401.cpp
//#include<iostream> //#include<vector> //#include<string> //using namespace std; // ////解法一 //class Solution { //public: // vector<string> readBinaryWatch(int num) { // vector<string> res; // //直接遍历 0:00 -> 12:00 每个时间有多少1 // for (int i = 0; i < 12; i++) { // for (int j = 0; j < 60; j++) { // if (count(i) + ...
ALGO
0.998272
5.234341
{ "github_metadata": { "branch": "master", "commit_count": 239, "repo_created_at": "2019-10-27T13: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": "ce1271a7...
f25bd1d6-749b-4564-aee6-a54d62f35b6c
urashima0429/keipro_practice
atcoder/abc/abc187/d.cpp
#include <iostream> #include <vector> #include <tuple> #include <algorithm> using namespace std; typedef long long ll; int main(){ int N, res = 0; ll aoki_sum = 0, takahashi_sum = 0; vector<tuple<ll,ll,ll>> t; cin >> N; for (int i = 0; i < N; ++i){ ll a,b; cin >> a >> b; aok...
ALGO
0.99966
3.692885
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2019-02-05T07:38: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": "27c691a83...
df7b82ef-3053-4717-84dd-502fefc9f5bf
Carla122/Pilas
pilas.cpp
# incluye < iostream > # incluye < conio.h > utilizando namespace std ; estructura nodo { int nro; struct nodo * sgte; }; int main () { int nodo, p, * ptrPila; // ptrPila = p; ptrPila = NULL ; int dato; int op; int x; hacer { cin >> op; interruptor (op) { ...
ALGO
0.99242
3.969165
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-10-17T13:44: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": "4200c49804...
878d4280-69f4-41c4-b8d5-66fdfd421979
fulatin/MyAlgorithmProblemCode
luogu/p1094.cpp
#include <bits/stdc++.h> #include <functional> using namespace std; int w, n; bool vis[100000]; int main() { cin >> w >> n; vector<int> v; for (int i = 0; i < n; ++i) { int curr; cin >> curr; v.push_back(curr); } int ans = 0; sort(v.begin(), v.end(), greater<>()); for (int i = 0; i <= n; ++...
ALGO
0.99999
4.044933
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-12-09T13:38: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": "62e58064ae...