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 |
|---|---|---|---|---|---|---|---|
03b17d97-0519-4dc1-9f70-35f3c5021559 | rawrbyte/Code-Dump-TAMU | CSCE-121/hw4pr3_zhu.cpp | //<NAME>
//CSCE 121-501
//Due: February 25, 2015
//hw4pr3_zhu.cpp
#include "std_lib_facilities_4a.h"
using namespace std;
bool yes(string input)
{
bool returnValue = false;
if ((input.at(0) == 'y') || (input.at(0) == 'Y')) {
returnValue = true;
}
return returnValue;
}
void answer(int result)
{
vector<st... | ALGO | 0.947229 | 3.395321 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-05-05T17:16:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "178493a147... |
94d094d0-080a-4022-b019-c68eb63ccc12 | illialaz/cpp_courses_1_sem | lesson6/matrix_oper.cpp | #include <iostream>
using namespace std;
int main(void){
int n;
cin >> n;
int** matrix;
matrix = new int* [n];
for(int i = 0; i < n; i++){
matrix[i] = new int [n];
}
for(int j = 0; j < n; j++){
int value = 0;
for(int i = j; i < n; i++){
matrix[i][j] = (value++);
}
val... | ALGO | 0.999715 | 3.657641 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2019-11-09T11:44:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5bde36f7e... |
e9cabc09-cf77-417c-b61a-d41c6da77033 | sctyner/dplyr050 | src/group_indices.cpp | #include <dplyr.h>
using namespace Rcpp ;
using namespace dplyr ;
// [[Rcpp::export]]
IntegerVector grouped_indices_grouped_df_impl( GroupedDataFrame gdf ){
int n=gdf.nrows() ;
IntegerVector res = no_init(n) ;
int ngroups = gdf.ngroups() ;
GroupedDataFrameIndexIterator it = gdf.group_begin() ;
for... | ALGO | 0.946861 | 6.65535 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-08-05T18:45:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "10e073df92... |
b8873bfc-d311-421e-84ab-0cbf7f1316fd | Kshitij27Kumar/DSA | Number of Provinces - GFG/number-of-provinces.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function Template for C++
class Solution {
public:
int numProvinces(vector<vector<int>> adj, int V) {
// code here
vector<int>list[V];
for(int i=0;i<V;i++){
for(int j=0;j<V;j++)... | ALGO | 0.999898 | 6.043701 | {
"github_metadata": {
"branch": "main",
"commit_count": 268,
"repo_created_at": "2023-02-06T17:11:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "01cd925622... |
cacd4bc3-6381-4ee5-8f2b-0d32d871d8d9 | olliw42/storm32bgc | old/betacopter/old/betacopter36dev-v005/ArduCopter/control_loiter.cpp | #include "Copter.h"
/*
* Init and run calls for loiter flight mode
*/
// loiter_init - initialise loiter controller
bool Copter::loiter_init(bool ignore_checks)
{
#if FRAME_CONFIG == HELI_FRAME
// do not allow helis to enter Loiter if the Rotor Runup is not complete
if (!ignore_checks && !motors->rotor_runu... | ALGO | 0.939475 | 6.06825 | {
"github_metadata": {
"branch": "main",
"commit_count": 243,
"repo_created_at": "2013-12-02T21:11:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 655,
"forks": 289,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "51a865... |
d197ef20-bf21-4f45-aa05-3a1d84cfc240 | LinCheYu1128/2024_NYCU_VLSI_Testing | podem/circuit.cc | #include <iostream>
//#include <alg.h>
#include "circuit.h"
#include "GetLongOpt.h"
#include <stack>
#include <list>
using namespace std;
extern GetLongOpt option;
// For assignment 0
void CIRCUIT::PrintAssignment0()
{
int total_fanout = 0;
int total_signal_net = 0;
int No_branch = 0;
int No_stem = 0... | ALGO | 0.984231 | 3.228141 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-09-07T09:05: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": "a3a3a18d639... |
a8c0e09e-5035-4a51-bf2d-1cc5a8c3f8ef | GHANGHASASHWANI/LEETCODE | 0082-remove-duplicates-from-sorted-list-ii/0082-remove-duplicates-from-sorted-list-ii.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* deleteDupli... | ALGO | 0.999993 | 5.603498 | {
"github_metadata": {
"branch": "main",
"commit_count": 1908,
"repo_created_at": "2024-09-21T02:51:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ad7894101... |
f5383af2-3244-40a1-86f0-d9a4b8a03f18 | xvzc/algorithms | boj/solved/1051/20231204_114842_main.cpp | #include <bits/stdc++.h>
#define debug if constexpr (local) std::cout
#define endl '\n'
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#ifdef LOCAL
constexpr bool local = true;
#else
constexpr bool local = false;
#endif
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
... | ALGO | 0.999979 | 4.924966 | {
"github_metadata": {
"branch": "main",
"commit_count": 337,
"repo_created_at": "2019-10-05T12:46:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6643412c9d... |
2eccc725-94c3-4ce3-b3d9-2e321203a001 | Akshit1482/Practise | 123.cpp | class Solution{
public:
int kthElement(int arr1[], int arr2[], int n, int m, int k)
{
int i=0;
int j=0;
int count = 0;
vector<int>ans;
while( i<n && j<m ){
if( arr1[i] < arr2[j] ){
ans.push_back( arr1[i] );
i++;
... | ALGO | 0.999999 | 5.04127 | {
"github_metadata": {
"branch": "main",
"commit_count": 197,
"repo_created_at": "2023-02-26T10:04: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": "9d7dac5fb6... |
c492b16c-cd94-4a61-8002-5935fca960d3 | L4plAcEee/TheWayofCode | solution/codeforces.com/Codeforces Round 1027 (Div. 3)/C.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
// 如果 n=0,直接输出 0
... | ALGO | 0.999981 | 4.408343 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2025-07-13T12:36: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": "890bb49042... |
7c58e5b0-76fd-4826-929e-5830116dbd50 | om1024bhosale/Daily-DSA-Practice | Strings/3-longest-substring-without-repeating-characters.cpp | /*
link-> https://leetcode.com/problems/longest-substring-without-repeating-characters/submissions/1138397637/
Given a string s, find the length of the longest
substring
without repeating characters.
Example 1:
Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3.
Example 2:
Input: ... | ALGO | 0.999822 | 5.718799 | {
"github_metadata": {
"branch": "main",
"commit_count": 227,
"repo_created_at": "2023-12-30T09:39: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": "395f591bc4... |
03dc063f-2822-45f3-ad85-f52045560911 | bootchk/smartBlinker | src/day/sunEventModel/sunEventCalculator.h |
#pragma once
#include "circularBuffer.h"
// msp430Drivers
#include <alarmClock/time/timeTypes.h>
#include <alarmClock/time/interval.h>
/*
* Understands a sample set of detected sunrise.
*
* SampleSet is kept such that samples are roughly 24 hours apart (periodic.)
* The caller can determine whether a give... | ALGO | 0.96852 | 7.274998 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2019-01-01T16:44: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": "569605c73... |
1577e17b-298a-417d-9365-bf577cbdcea2 | zhiz-m/Competitive-Programming | mexican_wave.cpp | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define fi first
#define se second
#define SZ(x) (int)(x).size()
#define rep(i,a,b) for (int i=a;i<b;i++)
#define per(i,a,b) for (int i=b-1;i>=a;i--)
#define each(a,x) for(auto&a:(x))
#define DEB... | ALGO | 0.999075 | 3.933649 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2021-05-08T06:22: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": "e6f6448296... |
c9f33141-9e49-4ace-b85c-a66449e4a220 | codesmith17/CODEFORCES | E_Making_Anti_Palindromes.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t;
cin >> t;
while (t--)
{
int n;
string s;
cin >> n;
cin >> s;
int cnt[26] = {0}, cnt2[26];
for (int i = 0; i < ... | ALGO | 0.999955 | 3.680319 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-12-18T15:20: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": "1ba0c1756d99... |
8c5a76ad-6675-42e0-b66c-b672ab5d99a1 | charles-pku-2013/CodeRes_Cpp | interview/2024/priority_queue/前K个高频单词.cc | /*
https://leetcode.cn/problems/top-k-frequent-words/description/
*/
class Solution {
public:
// 用指针数组排序提高效率
vector<string> topKFrequent(vector<string>& words, int k) {
using Table = std::unordered_map<std::string, int>;
Table table;
for (auto& word : words)
{ table[word]++; }... | ALGO | 0.999994 | 6.706723 | {
"github_metadata": {
"branch": "master",
"commit_count": 507,
"repo_created_at": "2015-10-12T16:10:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "086199a5... |
9cb2a3c2-dd31-4528-b4be-ddaac17461c2 | yahia3200/Restaurant-Management-Simulator | Restaurant/Generic_DS/LinkedList.h | #ifndef __LINKEDLIST_H_
#define __LINKEDLIST_H_
#include <iostream>
using namespace std;
#include"Node.h"
#include "../Rest/Order.h"
#include "../Rest/Cook.h"
template < typename T>
class LinkedList
{
private:
int count; // number of nodes in a list
Node<T>* Head; // Pointer to Head node
Node<T>* Tail; // Poi... | TOOL | 0.99675 | 4.20826 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2020-03-17T18:20:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5de9a05e1... |
2b13ee50-f932-488f-92cc-cc59180ba336 | trunghai95/MyCPCodes | Codeforces/665E.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXBIT = 30;
struct Node
{
Node* child[2];
ll cnt;
Node() { child[0] = child[1] = NULL; cnt = 0; }
};
Node* root;
int n, k, a[1000010], curXor;
ll res;
ll Count(Node* node, int bit)
{
if (bit < 0)
return 0;
int bk = ((k >> bit) ... | ALGO | 0.999992 | 4.34005 | {
"github_metadata": {
"branch": "master",
"commit_count": 155,
"repo_created_at": "2015-11-30T14:36:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "535ae1eb... |
671763a0-c5ed-45c7-bebb-91e69a358120 | NicolasMRamos/routes_app | src/main_files/modes.cpp | #include <iostream>
#include "../data_structures/Graph.h"
#include "../headers/parsing.h"
#include "../headers/driving.h"
#include "../headers/driving_walking.h"
#include "../headers/modes.h"
using namespace std;
// Batch Mode ------------------------------------------------------------------------------------------... | ALGO | 0.992347 | 4.928874 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-26T17:04:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "596696cdd118... |
ba7c1932-5603-4e30-a7a6-4e8e8c9c0a94 | shAwmitrAcse134582/phitron_course | Data Structure/Module-8/get_ME_mid.cpp | #include<bits/stdc++.h>
#define ll long long int
#define pb push_back
#define get_out return 0
#define fast ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
class Node{
public:
int val;
Node *next;
Node(int val){
this->val=val;
this->next=NULL;
}
};
void ins... | ALGO | 0.999985 | 3.740262 | {
"github_metadata": {
"branch": "main",
"commit_count": 286,
"repo_created_at": "2023-04-02T17:30: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": "ae263669a2... |
4a356c56-29e3-4af8-8497-e15478e7f0d8 | baibhabmondal/MyCodes | leetcode/30DaysApril/24.MaximalSquare.cpp | // Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.
// Example:
// Input:
// 1 0 1 0 0
// 1 0 1 1 1
// 1 1 1 1 1
// 1 0 0 1 0
// Output: 4
class Solution
{
public:
int maximalSquare(vector<vector<char>> &mat)
{
int i = 0, j = 0, ... | ALGO | 0.999916 | 6.332719 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2018-12-23T06:49:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "247b4bcd3... |
25637b40-9510-49c9-8726-f97715167106 | BoiseState/CS453-resources | cs253-examples/C-examples/using-C++-compiler-for-C-programs/arrays.cc |
/*
* Example to illustrate pointers/arrays magic in C/C++
*
*/
#include <iostream>
#include <iomanip>
#include <stdlib.h>
using namespace std;
int main(int argc, char **argv) {
// one dimensional arrays
int A[100];
for (int i=0; i<100; i++)
A[i] = i;
// B points to an array of 100 int'... | TOOL | 0.933193 | 4.741113 | {
"github_metadata": {
"branch": "master",
"commit_count": 701,
"repo_created_at": "2016-01-07T18:42:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 19,
"forks": 25,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e8e35bc... |
274720ab-1324-4fb8-be61-5851d05a5fcd | inthra-onsap/algorithms-archive | string/suffix_tree/suffix_node.cc | #include <unordered_map>
namespace algorithms_archive {
namespace string {
struct SuffixNode {
int start;
int *end;
std::unordered_map<char, SuffixNode *> children;
SuffixNode *suffix_link;
int suffix_index;
SuffixNode(SuffixNode *suffix_link_, int start_, int *end_)
: suffix_link{suffix_link_}, st... | ALGO | 0.998393 | 4.685344 | {
"github_metadata": {
"branch": "master",
"commit_count": 110,
"repo_created_at": "2017-04-28T13:51: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": "9fc85a2d... |
d153f698-9f0d-4e61-ba3a-ff8eafd424cc | ShyamB123/Contests | Codechef/Starters-109/d.cpp | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ld long double
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define mod 1000000007
#define inf 1e18
#define F first
#define S second
#define p... | ALGO | 0.999994 | 3.682526 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2023-07-14T03:49: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": "44722a598e1... |
02e591f2-1303-4b71-be61-30ecf139e493 | ishandutta2007/codeforces-a | alireza_kaviani/normal/601/B.cpp | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author alireza_kaviani
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
template<class T> using Tree = tree<T, null_t... | ALGO | 0.999987 | 5.452785 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51: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": "98db379b02a3... |
31ca3e58-d5b9-425b-84da-1a41094aa809 | basileplus/TI_vs22_cv43 | src/Frequency.cpp | #include "Frequency.h"
#define REAL 0
#define IMAG 1
Frequency::Frequency(Mat I)
{
DFT_rows = getOptimalDFTSize( I.rows );
DFT_cols = getOptimalDFTSize( I.cols );
}
Frequency::Frequency(Mat I, Configuration cfg)
{
W = cfg.W;
DFT_rows = getOptimalDFTSize( I.rows );
DFT_cols = getOptimalDFTSize(... | ALGO | 0.972053 | 4.870247 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2025-01-21T14:04: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": "8a986e948b... |
a947590c-0be7-4f24-84cf-f9fba2019a52 | kbdyj1/dailycommit | cpp_templates/ch_23.cpp | //=============================================================================
// C++ templates. the complete guide. 2nd
// Ch.23 Meta programming
//
// 22/11/01
//=============================================================================
#include <iostream>
#include <array>
namespace { //=====================... | TOOL | 0.903369 | 5.894617 | {
"github_metadata": {
"branch": "master",
"commit_count": 662,
"repo_created_at": "2022-01-08T15:28: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": "05e5169e... |
3d3b03a9-08db-401b-8310-b9b171d8674f | wacevedo/Works-of-University | Estructura de Datos/Lab/MENU.CPP | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <conio.h>
#include <process.h>
#include <ctype.h>
#include <dos.h>
int f=9,c=7;
int Linea(int x1, int y1, int y2)
{
int y;
for(y=y1; y<=y2; y++)
{
gotoxy(x1,y);
printf("%c",186);
gotoxy(x1,y);
printf("%c",186);
delay(1);
}
return 0;
}... | TOOL | 0.955938 | 3.330728 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-05-15T16:10: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": "c5140d3daf... |
33c3e048-0ff8-4a18-b6c6-7dfddd8101a6 | anubansal17/Coding-Career-Journey | Recursion/SortAnArray.cpp | // Time Complexity of recursive solution is more than O(nlogn) - Not preferable for sorting
class Solution {
public:
vector<int> sortArray(vector<int>& nums) {
int n = nums.size();
if(nums.size() == 1){
return nums;
}
int temp = nums[n-1];
nums.pop_back();
so... | ALGO | 0.999996 | 6.131022 | {
"github_metadata": {
"branch": "master",
"commit_count": 901,
"repo_created_at": "2020-02-09T14:11:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc2c9640... |
d5c68ceb-e06c-4800-9033-caf2b5397155 | ayushTNM/Tag_Comparison | RUNEtag/RUNETag/WinNTL/src/c_lip_impl.h |
#include <NTL/lip.h>
#include <NTL/ctools.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#define MustAlloc(c, len) (!(c) || ((c)[-1] >> 1) < (len))
/* Fast test to determine if allocation is necessary */
static
void zhalt(char *c)
{
fprintf(stderr,"fatal error:\n %s\nexit...\n",c);
... | ALGO | 0.994775 | 4.262152 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-09-14T12:13:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "75cdb9e7de29... |
d614c1f7-0867-4159-bcba-c8e10fdcdb19 | wisdompeak/LeetCode | Greedy/936.Stamping-The-Sequence/936.Stamping-The-Sequence.cpp | class Solution {
public:
vector<int> movesToStamp(string stamp, string target)
{
bool changed = 1;
vector<int>results;
while (changed==1)
{
changed = 0;
for (int i=0; i<target.size(); i++)
{
if (check(stamp,target,i))
... | ALGO | 0.99979 | 5.273666 | {
"github_metadata": {
"branch": "master",
"commit_count": 8912,
"repo_created_at": "2017-03-01T10:30:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6018,
"forks": 1314,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "5... |
75fa7e7b-bbab-402f-9147-bedb43e90dd1 | saadgibawa/DSA-Sheet | Day 40/Recursion[Lec 2] part 3/Letter Combinations of a Phone number.cpp | class Solution {
public:
vector<string> getLetters(const string& d) {
vector<string> ans;
for (auto x : d) {
string s = "";
if (x == '2') s += "abc";
else if (x == '3') s += "def";
else if (x == '4') s += "ghi";
else if (x == '5') s += "jkl... | ALGO | 0.99973 | 6.429835 | {
"github_metadata": {
"branch": "main",
"commit_count": 154,
"repo_created_at": "2024-08-11T07:02:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "73fbc58ae2... |
eb57df0c-28be-4c7c-bd9f-3062930d1340 | alaneos777/club | brazilian camp 2020/6/D.cpp | #include <bits/stdc++.h>
#define endl '\n'
#define forn(i, n) for(int i = 0; i < n; i++)
#define rep(i, a, b) for(int i = a; i < b; i++)
#define pb push_back
#define fi first
#define se second
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long int;
using ld = long double;
using pii = pair<int,... | ALGO | 0.99996 | 4.491128 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2018-08-06T04:13:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "83dd20390... |
4d4a3f5c-c307-4ed8-8bcb-54b57b8997f6 | MinumCoklatPanas/CF-Repo | codeforces/741/B.cpp | #include <bits/stdc++.h>
using namespace std;
//Made with <3 by MinumCoklatPanas
typedef long long ll;
#define int long long
const int INF = 1e9;
const ll INFF = 1e18;
const int MAXN = 510;
const int MOD = 1e9 + 7;
const double PI = acos(-1.0);
const double INFD = 1E9;
const double EPS = 1e-9;
mt19937 rng(chrono::stea... | ALGO | 0.999987 | 3.869188 | {
"github_metadata": {
"branch": "master",
"commit_count": 1426,
"repo_created_at": "2020-12-20T23:27:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9dd9a96... |
07505064-e97f-433e-93d6-bc5c307cfffb | Yui13KH/cpp-learning-journey | Algo & Problem-Solving L2/Problems/Number Manipulation/007-flipNumber.cpp | #include <iostream>
using namespace std;
string readInput(string msg) {
string strNumber;
do {
cout << msg << endl;
cin >> strNumber;
bool isValid = true;
for (char c : strNumber) {
if (!isdigit(c)) {
isValid = false;
break;
... | ALGO | 0.998813 | 4.379264 | {
"github_metadata": {
"branch": "main",
"commit_count": 226,
"repo_created_at": "2024-11-26T03:43:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0c8652688... |
52db6c9e-630a-418a-b9d8-9eae4c9d6cf6 | sin22766/POSN-TOI_related | PreTOI16/ThisSummer/TASK_072.cpp | #include <bits/stdc++.h>
using namespace std;
double distance(pair<int, int> p1, pair<int, int> p2) {
return sqrt(pow(p1.first - p2.first, 2) + pow(p1.second - p2.second, 2));
}
int main() {
int n, m;
cin >> n >> m;
pair<int, int> boy[n], girl[m];
for (int i = 0; i < n; ++i) {
cin >> boy[... | ALGO | 0.999967 | 3.733443 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-07T13:29:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "174ff218712a... |
16faddff-b200-4e25-ab25-9f24411bc66a | zhouyuhaoat/PAT | 1.algorithm/2.algorithm/1.sort/A1062-2.cpp | /*
* author: zhouyuhao
* created: 2024-04-27 21:16:00
* modified: 2024-04-27 21:20:00
* item: Programming Ability Test
* site: 914, Harbin
*/
/*
@pintia psid=994805342720868352 pid=994805410555346944 compiler=GXX
ProblemSet: PAT (Advanced Level) Practice
Title: 1062 Talent and Virtue
https://p... | ALGO | 0.999934 | 4.724014 | {
"github_metadata": {
"branch": "main",
"commit_count": 64,
"repo_created_at": "2025-05-20T01:36: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": "96ab76a14b2... |
0fae295f-72b4-4976-ae8e-e9f0924279d8 | gamer-project/gamer | tool/analysis/gamer_extract_uniform/GAMER_Functions/Buf_RecordBoundaryPatch.cpp | #include "ExtractUniform.h"
//-------------------------------------------------------------------------------------------------------
// Function : Buf_RecordBoundaryPatch
// Description : Record the patches near the sub-domain boundaries in "ParaVar.BounP_IDList"
//
// Parameter : lv : The targeted refinem... | ALGO | 0.921277 | 4.771344 | {
"github_metadata": {
"branch": "main",
"commit_count": 7047,
"repo_created_at": "2017-12-13T20:44:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 86,
"forks": 70,
"issues": 99,
"pull_requests": 32
},
"file_meta": {
"content_id": "e913d7... |
4d745f1c-4ae7-42f2-bb66-4c92e4b8b8e8 | RupeshAryal/Data_Structure_and_Algorithms | 4.Stack/LinkedListStack.cpp | #include<iostream>
using namespace std;
class Node
{
public:
int data;
Node *next;
};
class Stack
{
private:
Node *top;
public:
Stack()
{
top = NULL;
}
void push(int x)
{
Node *t = new Node;
if(t == NULL)
... | ALGO | 0.997042 | 4.547452 | {
"github_metadata": {
"branch": "main",
"commit_count": 76,
"repo_created_at": "2022-08-14T07:23:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6bd7d258a1e... |
48a60963-97be-415f-a1e5-8a6ab391121a | nhulemis/DemoCpp | DemoCpp/ThuanNghich.cpp | #include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
void giaiPhauSo(int n) {
int soMoi = 0, soCu = n;
int tong = 0;
while (n > 0)
{
int sodu = n % 10;
tong += sodu;
soMoi = (soMoi * 10 + sodu);
n /= 10;
}
if (soMoi == soCu && tong % 10 == 0)
{
cout << soCu << " ";
}
... | ALGO | 0.998235 | 3.082342 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-11-17T14: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": "15538be817... |
0dbab93e-6117-4edb-a08b-aa0e9963b62b | keskinm/fully-connected-nn-for-non-linear-regression | main.cpp | #include <algorithm>
#include <iostream>
#include <random>
#include <vector>
#include <math.h>
class GenParabolaData
{
public:
GenParabolaData(int low, int high, int size)
: random_engine_{std::random_device{}()}
, distribution_{low, high}
{
for (int j=0 ; j < size; j++)
{
... | ALGO | 0.999652 | 5.592275 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2019-12-07T15: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": "ac9ae8481... |
cfbfc11a-47e2-466f-8ee2-83067e7714d7 | ishhcode/DSA-sheet | Day-13/nextGreaterElement.cpp | //next greater element
vector<int> nextGreaterElement(vector<int>& arr, int n)
{
// Write your code here
vector<int> ans(n,-1);
stack<int> st;
for(int i=n-1;i>=0;i--){
while(!st.empty() && st.top()<=arr[i]){
st.pop();
}
if(st.empty()==false){
ans[i]=st.top();
}
st.push(arr[i]);
}
return ans;... | ALGO | 0.999962 | 5.095875 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2024-01-26T16: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": "f40f532a73e... |
e460759d-7b77-4f7f-b8d2-a9dd8809d4fa | GrainRainy/Code-Repositories | [Top] Storage/Exercises/acwing2715-后缀数组.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
char s[N];
int n, m, sa[N], x[N], y[N], c[N];
int rk[N], lcp[N];
void SuffixSort() {
for (int i = 1; i <= n; ++ i) c[x[i] = s[i]] ++;
for (int i = 1; i <= m; ++ i) c[i] += c[i - 1];
for (int i = n; i; -- i) sa[c[x[i]] --] = i;
for (int k = 1, to... | ALGO | 0.999961 | 3.73147 | {
"github_metadata": {
"branch": "main",
"commit_count": 179,
"repo_created_at": "2023-07-13T12:33: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": "0dff0f4117... |
bcb8301e-d45d-4ce7-bc98-14b3782a963f | Radwan-Albahrani/CloudCode | 2021-2022/Term 1/Test/test.cpp | #include <iostream>
#include <algorithm>
#include <array>
using namespace std;
int compare(const void *arg1, const void *arg2);
int main(int argc, const char** argv)
{
// Initialize array
int a[5][2] =
{
{10,20},
{30,5},
{11,10},
{9,19},
{12,10}
};
// Sort ... | ALGO | 0.99989 | 5.521887 | {
"github_metadata": {
"branch": "master",
"commit_count": 226,
"repo_created_at": "2021-11-03T22:38:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "70b7ae9c... |
a87ec54b-e259-4318-bbb6-b45226ba6a61 | ehnryx/acm | kattis/tsp/tsp.cpp | #pragma GCC optimize("O3")
#pragma GCC target("sse4,avx2,abm,fma")
#pragma GCC optimize("fast-math")
#include <bits/stdc++.h>
using namespace std;
#define _USE_MATH_DEFINES
mt19937 rng(7);
const char nl = '\n';
typedef float ld;
typedef complex<ld> pt;
template <class T>
ostream& operator << (ostream& os, const vect... | ALGO | 0.999991 | 4.577557 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2018-05-03T04:18:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9af0729e5... |
4f927eec-3399-4654-84f0-dd621b4184d9 | matt448/plantgame | Mario_Plant_Game/Mario_Plant_Game.ino | // Limit switch pins
int topLimitState = 0;
int bottomLimitState = 0;
const int topLimitPin = 11;
const int bottomLimitPin = 10;
// Stepper motor pins
const int enablePin = 5;
const int dirPin = 2;
const int stepPin = 3;
const int ms1Pin = 6;
const int ms2Pin = 4;
const int ledPin = 13;
// Motor constants
const int s... | ALGO | 0.939623 | 5.461137 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2016-02-19T15:12: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": "69857f9cc... |
461b16e0-104b-4005-a0a7-529d2bb28b54 | praveen-official/tasks_at_guvi | find_circular_ll.cpp | #include<iostream>
using namespace std;
class node
{
private:
int data;
node *head,*next,*pointer,*temporary;
public:
node()
{
head=NULL;
}
int create_circular_LL(int user_data)
{
if(head==NULL)
{
pointer=new node();
pointer->data=user_data;
... | ALGO | 0.999353 | 5.157619 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-02-23T06:06:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ccf745387... |
91db412b-9614-4e04-ad7f-c0aa257e2b85 | raolinfu/leetcode | hard/6109.cpp | #include <vector>
#include <cmath>
using namespace std;
class Solution {
public:
int peopleAwareOfSecret(int n, int delay, int forget) {
int mod = pow(10, 9) + 7;
int ans = 0;
vector<int> dp(forget + 1, 0);
dp[1] = 1;
for (int i = 0; i < n - 1; i++) {
int s = 0... | ALGO | 0.999986 | 4.690549 | {
"github_metadata": {
"branch": "master",
"commit_count": 568,
"repo_created_at": "2021-10-09T06:34: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": "81bae2c5... |
c145d6cd-9d56-4fb3-9d5f-a0e5de20c7ca | Akshityadav007/DSA | Leetcode/AsteroidCollision/ast.cpp | #include<iostream>
#include<vector>
#include<stack>
#include<algorithm>
using namespace std;
// Problem || Leetcode : 735
/*
-> We are given an array asteroids of integers representing asteroids in a row.
-> For each asteroid, the absolute value represents its size, and the sign represents its direction (posi... | ALGO | 0.999979 | 5.676424 | {
"github_metadata": {
"branch": "main",
"commit_count": 148,
"repo_created_at": "2023-09-16T10:24: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": "95d2911c11... |
9bece184-779c-472d-a545-8208e7e5d25e | SeanCampbell/WordAnalysis | vxl_src/contrib/brl/bseg/boxm2/ocl/pro/processes/boxm2_ocl_merge_process.cxx | // This is brl/bseg/boxm2/ocl/pro/processes/boxm2_ocl_merge_process.cxx
#include <bprb/bprb_func_process.h>
//:
// \file
// \brief A process for rendering depth map of a scene.
//
// \author <NAME>
// \date Mar 10, 2011
#include <vcl_fstream.h>
#include <boxm2/ocl/boxm2_opencl_cache.h>
#include <boxm2/boxm2_scene.h>
... | ALGO | 0.924816 | 4.77764 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2016-02-16T04:49:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea72c4c6a... |
97a135d4-821d-4c1c-ad19-2501197f459e | UltraProton/PlacementPrep | Graph/Shortest paths/Dijkstras/usingstl_2.cpp | /*
* If we use priority_queue of pair of int then then by default the elements are arranged according to the first value of the pair.
* We can have our own default order by declaring.
! https://stackoverflow.com/questions/37318537/deciding-priority-in-case-of-pairint-int-inside-priority-queue
? To simplify our life ... | ALGO | 0.999972 | 5.010516 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2019-09-30T20:44: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": "ad9c6cad7... |
e6196e9f-4acb-420b-a84c-f83bc0656c8c | Conglang/MyLeetCode | src/Combination_Sum_IV.cpp | //////////////////////////////////////////////////////
// Project: MyLeetCode
//
// Author: YanShicong
// Date: 2016/11/07
//////////////////////////////////////////////////////
/*--------------------------------------------------------------------------------------------------------------
* Given an integer ar... | ALGO | 0.999992 | 5.925855 | {
"github_metadata": {
"branch": "master",
"commit_count": 154,
"repo_created_at": "2014-10-25T07:44:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a7302009... |
0017d971-c17e-43fa-b394-d8c7b8b32900 | umbatoul/Android-Voice-IDentification-App-using-SPRO-ALIZE-LIARAL | jni/LIA_SpkTools/src/Tools.cpp | /*
This file is part of LIA_RAL which is a set of software based on ALIZE
toolkit for speaker recognition. ALIZE toolkit is required to use LIA_RAL.
LIA_RAL project is a development project was initiated by the computer
science laboratory of Avignon / France (Laboratoire Informatique d'Avignon -
LIA) [http://lia.univ-... | ALGO | 0.992664 | 6.334869 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2014-10-19T10:29:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8257804555... |
dd632757-0c5d-472c-9b01-1066f1ef84e0 | Mikhail-M/Programming_in_university | VeraDron/2 semestr/DateStruct/Standart Data Structers/HashTable/hashtable.cpp | #include "hashtable.h"
#include <iostream>
#include <cstring>
#include <list>
#include <algorithm>
using namespace std;
HashTable::HashTable():hashFunc(getHashFunction(2))
{
init(10);
}
HashTable::HashTable(int size):hashFunc(getHashFunction(2))
{
init(size);
}
HashTable::~HashTable()
{
for (int i = ... | ALGO | 0.994013 | 4.47953 | {
"github_metadata": {
"branch": "master",
"commit_count": 211,
"repo_created_at": "2014-02-17T23:26: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": "1caeb9e1... |
2dfacc84-6b29-4a97-a48e-1bbcf0866f73 | ImperishableMe/codeforces-submissions | codeforces/350/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
typedef long long ll;
typedef pair<int,int> PII;
const int up = 1e5 +5;
#define loop(i , a , b) for(int i = int(a); i <= int(b); i++)
#define vi(x) vector<int> x;
int main()
{
int... | ALGO | 0.999993 | 3.232054 | {
"github_metadata": {
"branch": "master",
"commit_count": 1316,
"repo_created_at": "2021-02-22T10:48:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "43e77c8... |
43bdc28b-5e6d-47c9-b6d4-0ac0441668c7 | shariarhossain17/contest_practice | judge/codeforces/div_3/daytona_cost.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define newLine cout << "\n"
#define pb push_back
#define vi vector<int>
#define Yes cout << "YES\n"
#define No cout << "NO\n"
#define array_input_int(a, o, n) \
for (int i = o; i < n; i++) \
{ \
cin >> (a[i]... | ALGO | 0.99981 | 4.350667 | {
"github_metadata": {
"branch": "main",
"commit_count": 165,
"repo_created_at": "2023-10-01T13: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": "756f875de5... |
ca8d250d-2dfa-4694-ad6c-312dc3fda3b6 | HuifengShrimp/FSS-LR | spu/psi/core/mini_psi.h | // Copyright 2022 Ant Group 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 or agreed ... | TOOL | 0.983603 | 6.714116 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-12-06T03:11: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": "8db9a6aa3c... |
e116a1b1-414f-42ff-a5e2-47d3d8cd1570 | Mohit-Raj1712/LeetCode-Solutions | 142. Linked List Cycle 2.CPP | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode *detectCycle(ListNode *head) {
if (head == nullptr || head -> next == nullptr)
return nullptr... | ALGO | 0.999912 | 5.833084 | {
"github_metadata": {
"branch": "main",
"commit_count": 124,
"repo_created_at": "2023-09-11T04:09: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": "269097a6ac... |
64955e71-cf7f-4675-8eb3-4b6b1d973228 | catid/libcat | MergeSort.hpp | /*
Copyright (c) 2011 <NAME>. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following d... | ALGO | 0.999867 | 7.084468 | {
"github_metadata": {
"branch": "master",
"commit_count": 93,
"repo_created_at": "2013-12-03T08:18:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 6,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "72885fa1... |
7e10044d-caf4-4d38-96d6-607a3a9ac373 | Tencent/GameAISDK | Modules/boost/Windows/include/boost/geometry/algorithms/detail/distance/segment_to_box.hpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2014, Oracle and/or its affiliates.
// Contributed and/or modified by <NAME>, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTA... | ALGO | 0.999934 | 7.371112 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2020-08-13T06:50:55.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2384,
"forks": 480,
"issues": 38,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca46... |
667b3f56-1672-48f7-ad24-21dea2f04720 | mkaouer/Code-Smells-Detection-in-JavaScript | JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/362764/shogun-3.1.1/shogun-3.1.1/src/shogun/distance/Distance.cpp | /*
* this program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Written (W) 2006-2009 <NAME>
* Written (W) 2006-2009 <NAME... | ALGO | 0.977837 | 6.460981 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2016-11-16T11:47:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 4,
"issues": 0,
"pull_requests": 18
},
"file_meta": {
"content_id": "ebb9bfdd... |
7a58e74e-0fb6-44dc-819e-54e545125cb5 | Batname/ArduinoFanClient | ArduinoFanClient.ino | #include <string.h>
#define BRAKE 0
#define CW 1
#define CCW 2
#define CS_THRESHOLD 15 // Definition of safety current (Check: "1.3 Monster Shield Example").
//MOTOR 1
#define MOTOR_A1_PIN 7
#define MOTOR_B1_PIN 8
//MOTOR 2
#define MOTOR_A2_PIN 4
#define MOTOR_B2_PIN 9
#define PWM_MOTOR_1 5
#define PWM_MOTOR... | TOOL | 0.941115 | 5.458316 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-11-26T20:05: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": "4083ecc1b1... |
cf18f89d-e235-4724-bcb6-c02e372729ce | shivani16btcs/Codechef | December long challenge 2020/5HaiExor_HXOR_unsubmitted.cpp | //getting TLE on this solution
#include <iostream>
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int setBitNumber(long int n)
{
if (n == 0)
return 0;
long long bt = 1;
for(int i = 31; i >= 0; i--)
{
int bit = (n & (1<<i));
if(bit != 0... | ALGO | 0.999859 | 3.851417 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-12-05T14:24: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": "5c8c7d0ac7... |
b532e79e-e7eb-4318-a2df-1cb3b31c9559 | AlgoMorgo/2021PS | 210306/1199_신동윤.cpp | #include <iostream>
#define MAX 1001
using namespace std;
int N;
int adj[MAX][MAX];
int degree[MAX];
void dfs(int node) {
for (int i = 1; i <= N; ++i) {
while (adj[node][i]) {
adj[node][i]--;
adj[i][node]--;
dfs(i);
}
}
cout << node << " ";
}
int main... | ALGO | 0.999932 | 4.371331 | {
"github_metadata": {
"branch": "main",
"commit_count": 366,
"repo_created_at": "2020-12-31T15:26:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eff4a5cd67d... |
50590dfd-b010-4a2c-822b-3f6d275f6591 | qir-alliance/qcor | lib/impl/seven_qubit_steane_code.hpp | /*******************************************************************************
* Copyright (c) 2018-, UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the MIT License
* which accompanies this distribution.
*
* Contributors:
* <NAME... | ALGO | 0.98986 | 5.697257 | {
"github_metadata": {
"branch": "master",
"commit_count": 1435,
"repo_created_at": "2019-05-13T14:26:19.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 100,
"forks": 42,
"issues": 33,
"pull_requests": 2
},
"file_meta": {
"content_id": "a80d... |
ae53bec8-9d72-472c-8799-7764104e407c | adi-creator/on-the-fly-calculator | calculator.cpp | #include <conio.h>
#include <iostream>
#include <string>
using namespace std;
int evaluateExpression(const string& expression, size_t& index);
// evaluate a number in the expression
int evaluateNumber(const string& expression, size_t& index)
{
int num = 0;
while (index < expression.size() && isdigit(expressi... | ALGO | 0.981764 | 4.679574 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-07-11T11:21: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": "4d051ac4543f... |
8ca2bc47-0a29-4950-8cac-dbc0dada070c | xavierbeast68/GeeksforGeeks | 2. Problems Solutions/kth-element-in-matrix.cpp | //* https://www.geeksforgeeks.org/kth-smallest-element-in-a-row-wise-and-column-wise-sorted-2d-array/
//* https://practice.geeksforgeeks.org/problems/kth-element-in-matrix/1?utm_source=gfg&utm_medium=article&utm_campaign=bottom_sticky_on_article
//{ Driver Code Starts
// kth largest element in a 2d array sorted row-wi... | ALGO | 0.999804 | 6.0676 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2023-02-04T07:30: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": "7e493f786... |
e6316cfa-2127-4fd2-8af5-add90b372855 | changicho/algorithm-training | AtCoder/Beginner Contest/AtCoder Beginner Contest 383/C/code.cpp | #include <algorithm>
#include <climits>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
struct Rank {
string name;
... | ALGO | 0.999954 | 3.734562 | {
"github_metadata": {
"branch": "master",
"commit_count": 2455,
"repo_created_at": "2019-09-02T14:53:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 44,
"forks": 4,
"issues": 25,
"pull_requests": 0
},
"file_meta": {
"content_id": "4dd28... |
d63e8957-4023-4d5b-b97d-4a5956cfcf4e | codestacx/cppprojects | Source5.cpp | //#include <cmath>
//#include <cstdio>
//#include <vector>
//#include <iostream>
//#include <algorithm>
//#define ROW 3
//#define COL 3
//using namespace std;
//
//
//class Puzzle{
//
// int goal[3][3]; // goal to be found
//
// int src[3][3]; // src to be compared
//
//
//public:
// Puzzle(int goal[][3], int target... | ALGO | 0.999911 | 3.857136 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-05-25T23:14: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": "38c934801e... |
d0ff2bb4-4997-44c2-a2f4-2dbcc8fb8202 | sanlal/sem2 | ARRAY BASED IMPLEMENTATION OF STACK/stack template.cpp | #include<iostream>
#define INVALID_DATA ' '
using namespace std;
template <typename T>
class stack{
private:
int capacity;
int topIndex;
T arr[100];
public:
stack(){
capacity = 5;
topIndex = -1;
}
stack(int c){
capacity = c;
topIndex = -1;
}
//const int capacity = 5;
//int topIndex = -1;
... | ALGO | 0.99211 | 3.999087 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2023-04-27T06:41: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": "5998eebbf1b... |
68eb5a1e-3633-4d4e-9ba7-d37eb749bf48 | dgaurav300/C-Plus-Plus-Example | Basic Exercise Set -1/Exercise-32.cpp | #include <iostream> // Including input-output stream header file
using namespace std; // Using the standard namespace
int main() // Start of the main function
{
signed long num1 = 0; // Declaring and initializing a signed long variable num1 to zero
cout << "\n\n Check whether a number is positive, negative o... | ALGO | 0.999412 | 4.62629 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-08-03T09:49: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": "d912bbc543a... |
ec1dca8a-4270-4675-a7c7-924855cac2d4 | KimYehyun/Algorithm | 백준/Silver/13565. 침투/침투.cc | #include <bits/stdc++.h>
using namespace std;
const int MAX = 1001;
int dir[4][2] = { {1, 0}, {-1, 0}, {0, 1}, {0, -1} };
char b[MAX][MAX];
bool visited[MAX][MAX];
int main(void) {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int m, n;
cin >> m >> n;
for (int i = 1; i <= m; i++)
for (int j = 1; j ... | ALGO | 0.99994 | 4.878456 | {
"github_metadata": {
"branch": "master",
"commit_count": 693,
"repo_created_at": "2023-04-03T08:53: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": "6bc08bb1... |
b2ad8128-7d8c-4d86-b9a5-b1291c6141bc | dougshidong/PHiLiP | src/flow_solver/flow_solver_cases/cube_flow_uniform_grid.cpp | #include "cube_flow_uniform_grid.h"
#include "physics/physics_factory.h"
namespace PHiLiP {
namespace FlowSolver {
template <int dim, int nstate>
CubeFlow_UniformGrid<dim, nstate>::CubeFlow_UniformGrid(const PHiLiP::Parameters::AllParameters *const parameters_input)
: FlowSolverCaseBase<dim, nstate>(parameters_in... | ALGO | 0.999733 | 6.546228 | {
"github_metadata": {
"branch": "master",
"commit_count": 1502,
"repo_created_at": "2018-12-17T20:30:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 49,
"forks": 40,
"issues": 80,
"pull_requests": 14
},
"file_meta": {
"content_id": "faf... |
baa76e22-2f5b-44d1-974d-6cf1b034bd53 | hameem008/Competitive_Programming | Codeforces_and_others/HamiltonianWall.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define gap ' '
typedef long long ll;
void solve(int I)
{
ll i, j, k, a, b, m, n, p;
// solve stars
cin >> n;
string row_1, row_2;
cin >> row_1;
cin >> row_2;
reverse(row_1.begin(), row_1.end());
reverse(row_2.begin(), row_... | ALGO | 0.999935 | 4.275834 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-06-02T07:22: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": "0816a190e837... |
1e3e543f-b7a3-440c-bfc2-f117a2b9da92 | RosettaCommons/rosetta | source/src/protocols/simple_filters/ChiWellRmsdEvaluator.cc | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... | ALGO | 0.992911 | 6.704665 | {
"github_metadata": {
"branch": "main",
"commit_count": 11737,
"repo_created_at": "2023-11-17T16:42:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 296,
"forks": 100,
"issues": 27,
"pull_requests": 9
},
"file_meta": {
"content_id": "a1c2... |
bc657575-4b2f-4436-afc2-65049025ccdb | kothariji/competitive-programming | GeeksforGeek - DSA Practice Problems/Arrays_sum.cpp | /*
* कर्मणये वाधिकारस्ते मां फलेषु कदाचन ।
* मां कर्मफलहेतुर्भू: मांते संङगोस्त्वकर्मणि ॥
*/
#include <bits/stdc++.h>
using namespace std;
#define bug(...) __f (#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cout << name << " : " << arg1 << endl; }
template ... | ALGO | 0.999273 | 5.410342 | {
"github_metadata": {
"branch": "master",
"commit_count": 1881,
"repo_created_at": "2020-08-27T07:08:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 680,
"forks": 501,
"issues": 2,
"pull_requests": 2
},
"file_meta": {
"content_id": "464... |
a20ffcbc-d15b-4be9-b5b4-53217d71eb0c | BassamRamadan/CompetitiveProgramming3 | uva/UVa - 10170 The Hotel with Infinite Rooms.cpp | //#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <map>
#include <deque>
#include <queue>
#include <stack>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <vector>
#include <set>
#include <complex>
#include... | ALGO | 0.999936 | 3.505285 | {
"github_metadata": {
"branch": "master",
"commit_count": 199,
"repo_created_at": "2018-03-01T22:55: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": "e6ce90ca... |
9eb9fdd8-069d-45b4-8c92-0b18b0f54e0f | ajajaj2807/CP | codeforces/369/C.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ar array
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define mset(arr, val) memset(arr, val, sizeof(arr))
const int MOD = 1e9+7;
const int mxN = 1e5;
vector<pair<ll, bool>> edges[mxN];
set<int> ans;
bool dfs(i... | ALGO | 0.999933 | 3.984335 | {
"github_metadata": {
"branch": "master",
"commit_count": 132,
"repo_created_at": "2020-12-22T09:12: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": "81f91b08... |
25547455-7447-4256-8c40-10a32bf43413 | rohitramteke1/consistency | 4.ARRAY/10freqInSortedArr.cpp | #include <bits/stdc++.h>
using namespace std;
// O(N) + O(1)
void brute(vector<int> &arr) {
int n = arr.size();
int count = 1;
int i = 1;
while(i < n) {
while(i+1 < n && arr[i-1] == arr[i]) {
count++;
i++;
}
cout << arr[i-1] << ' ' << count << endl;
... | ALGO | 0.999769 | 4.121283 | {
"github_metadata": {
"branch": "main",
"commit_count": 82,
"repo_created_at": "2022-10-23T20:05:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d492dd19b1a... |
9aea49bf-fd2f-43c5-b3c3-e2e4e6197787 | sunyzm/ZGeometry | ZGeometry/src/differntial_geometry.cpp | #include "differential_geometry.h"
#include <ZGeom/spectral_analysis.h>
#include <ZGeom/zassert.h>
#define USE_AMP
using namespace std;
void computeSGWMat(const ZGeom::EigenSystem& mhb, int waveletScaleNum, ZGeom::DenseMatrixd& matSGW)
{
ZGeom::runtime_assert(waveletScaleNum >= 1, "Illegal waveletScaleNum");
... | ALGO | 0.999 | 5.716815 | {
"github_metadata": {
"branch": "master",
"commit_count": 530,
"repo_created_at": "2012-08-15T02: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": "f0366d1d... |
2462d098-ab99-418c-9e06-0172f6db14d0 | gnorris55/CSC485B_A2 | include/dense_graph.h | #include <cstddef> // std::size_t type
#include "cuda_common.h"
#include "data_types.h"
namespace csc485b {
namespace a2 {
/**
* A DenseGraph is optimised for a graph in which the number of edges
* is close to n(n-1). It is represented using an adjacency matrix.
*/
str... | ALGO | 0.999795 | 5.969944 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-10-24T20:55: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": "9f8aabb26d7... |
672ade8d-feb0-4e54-a20e-3746e9f85ebe | pr0g/aoc-2020 | day7/main.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <utility>
#include <sstream>
#include <array>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
static inline void ltrim(std::string &s) {
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char c... | TOOL | 0.970088 | 5.170393 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2020-12-03T20:41: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": "965426ee161... |
c92974c7-377f-4b06-b7ab-b71c257de081 | kklions1/os_final_labs | LabY/main.cpp | #include <iostream>
#include <pthread.h>
#define NUM_THREADS 6
class semaphore {
private:
int value;
public:
void P() {
while (value == 0) {
// Wait
continue;
}
value--;
}
void V() {
value++;
}
semaphore(int v) : value(v) {}
... | ALGO | 0.996697 | 5.658255 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-04-16T22:20: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": "56a7be0348... |
3abf1dd0-82e8-4500-9d6d-0b2495288f51 | begong313/algorithm_study | MinJe/Week 25/9009_피보나치.cpp | #include <iostream>
#include <vector>
using namespace std;
vector<int> fibo;
int index = 2;
void init(){
fibo.push_back(1);
fibo.push_back(1);
}
void updateFibo(int n){
int val = fibo[index-1]+fibo[index-2];
while (val <= n){
fibo.push_back(val);
index++;
val = fibo[index-1]+... | ALGO | 0.999976 | 5.051314 | {
"github_metadata": {
"branch": "main",
"commit_count": 241,
"repo_created_at": "2023-11-07T02:42:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "60b4c5a8e5... |
e58fb85d-12dd-46ea-bf46-7296f99ccb09 | kutiny/ApoyoCpp | pregunta4/main.cpp | /*
Pregunta 4:
Codifique la definición de una función cuyo prototipo es:
void extraeFila(int matriz[NMAX][NMAX], int Nodos, int f, int fila[NMAX]);
La función recibe como argumento un arreglo bidimensional de enteros con NMAX filas y NMAX columnas.
Se debe asumir que NMAX es una constante globa... | ALGO | 0.99476 | 3.696663 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2020-07-14T11:18: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": "dc9ac7784... |
ee102003-784d-4625-877c-23bf801910cc | lawless-ionizer/Pathfinding_Algorithms | RRT_star.cpp | #include <SFML/Graphics.hpp>
#include <iostream>
#include <vector>
#include <cmath>
#include <limits>
#include <cstdlib>
#include <ctime>
#include <algorithm>
struct Point {
double X, Y;
Point(double x = 0, double y = 0) : X(x), Y(y) {}
};
struct Node {
sf::Vector2f point;
Node* parent;
double cos... | ALGO | 0.999976 | 5.133484 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-07-04T18:01: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": "f5faba4c3c... |
df063007-4f95-4972-8db0-a31fcecadb68 | ishandutta2007/codeforces-z | zdolny_kaczor/normal/87/C.cpp | # include <cstdio>
const int MN = 1 << 17;
int tree[MN * 2];
int read(int l, int r, int wh = 1, int lb = 0, int rb = MN - 1)
{
if (l > rb || r < lb)
return 0;
else if (l <= lb && r >= rb)
return tree[wh];
else
return read(l, r, wh * 2, lb, (lb + rb) / 2) ^ read(l, r, wh * 2 + 1, (lb + rb) / 2 + 1, rb);
}
void ... | ALGO | 0.999921 | 3.236248 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:43: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": "3f247bf9f8e1... |
629631f3-af16-4a68-9f03-07c3cda93eb6 | vishal-1825/leetcode | 3196-apply-operations-to-maximize-frequency-score/apply-operations-to-maximize-frequency-score.cpp | typedef long long ll;
class Solution {
public:
// TLE
// int maxFrequencyScore(vector<int>& nums, long long k)
// {
// sort(nums.begin(), nums.end());
// unordered_map<ll, ll> freq, index;
// for (int i=0; i<nums.size(); i++)
// {
// freq[nums[i]]++;
// ... | ALGO | 0.999982 | 5.816097 | {
"github_metadata": {
"branch": "main",
"commit_count": 1068,
"repo_created_at": "2023-09-06T05:50: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": "e86027bfc... |
d30c7d92-ffbe-4da7-898b-ddd107e71be6 | GarancePerrot/CSE306 | project2/lab7_2.cpp | #include "includes.h"
double sqr(double x) {return x*x;};
class Vector { // we use the same class vector but leave the third coordinate to 0 as the points are of two dimension
public:
explicit Vector(double x = 0, double y = 0, double z = 0) {
coords[0] = x;
coords[1] = y;
coords[2] = z;
}
double norm2(... | ALGO | 0.999831 | 5.09824 | {
"github_metadata": {
"branch": "main",
"commit_count": 65,
"repo_created_at": "2024-03-25T09:17: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": "fa983a28785... |
682810b9-a8e2-4d05-9db0-3ecda4a2d7ca | raincross7/code-similarity | codes/train_code/problem310/problem310_311.cpp | #pragma GCC optimize("O3") //コンパイラ最適化用
#define _GLIBCXX_DEBUG //配列に[]でアクセス時のエラー表示
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
// forループ関係
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
// Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはメントされる
#define REP(i, n) for (ll i = 0; i < ll... | ALGO | 0.999939 | 3.754625 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07: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": "800abbde3a70... |
27d44d19-707b-4819-90ce-775af0e2abd0 | yiwiy9/practice-algorithm-cpp | ABC/239/review/d.cpp | #include <iostream>
#include <vector>
using namespace std;
vector<bool> Eratosthenes(int N) {
// テーブル
vector<bool> isprime(N+1, true);
// 1 は予めふるい落としておく
isprime[1] = false;
// ふるい
for (int p = 2; p <= N; p++) {
// すでに合成数であるものはスキップする
if (!isprime[p]) continue;
// p 以外の p の倍数から素数ラベルを剥奪
for... | ALGO | 0.99969 | 4.486228 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2022-03-03T08:22: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": "5344e0cd9... |
36519211-e28e-4c25-bd23-d58819aafdf5 | PhiCtl/ShootingStars | Linear_solvers/src/Conjugate_Gradient.cpp |
#include "Conjugate_Gradient.h"
#include <iostream>
#include <complex>
template <typename T> Conjugate_Gradient<T>::Conjugate_Gradient(const Vector<T>& vec, int nb_iters, double tol):Iterative_Solver<T>(vec, nb_iters, tol) {};
template <typename T> Conjugate_Gradient<T>::Conjugate_Gradient():Iterative_Solver<T>() {}... | ALGO | 0.998808 | 4.651495 | {
"github_metadata": {
"branch": "main",
"commit_count": 225,
"repo_created_at": "2020-11-20T09:17: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": "097b91668c... |
cb2faf61-0d28-40c9-abad-a1ba4a70bc03 | shangrex/Homework | operating_systems/external_sort/sort.cpp | #include <iostream>
#include <time.h>
#include <fstream>
#include <vector>
#include <algorithm>
#include <typeinfo>
#include <bits/stdc++.h>
#include <vector>
using namespace std;
int arr[100000000];
void initial_split(FILE * file_in, int block_size, int* count_pages, vector<FILE*> *pages){
//load to output temp fi... | ALGO | 0.997481 | 3.869199 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2020-10-07T07:27:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e5e7bb07... |
8904c35c-6c95-481d-8736-5055b33d2f5d | halterman/CppBook-SourceCode | Chap21/phonelist.cpp | #include <iostream>
#include <string>
#include <map>
#include <algorithm>
int main() {
std::map<std::string, int> contacts; // Telephone contact list
bool running = true;
while (running) {
std::string name;
int number;
char command;
std::cout << "A)dd L)ook ... | TOOL | 0.956915 | 4.232968 | {
"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": "c64e7b35... |
61dc5da7-db2f-483f-b248-816b8352063e | Priyadarshan2000/Hacktoberfest_2k22 | DSA/LCS of three strings.cpp | /*LCS of three strings
Given 3 strings A, B and C, the task is to find the
longest common sub-sequence in all three given sequences.
*/
#include<bits/stdc++.h>
using namespace std;
int LCSof3 (string A, string B, string C, int m, int n, int o)
{
int dp[m+1][n+1][o+1];
for(int i=0;i<m+1;i++){
for... | ALGO | 0.999641 | 4.756076 | {
"github_metadata": {
"branch": "main",
"commit_count": 441,
"repo_created_at": "2022-10-05T06:57:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 103,
"issues": 5,
"pull_requests": 28
},
"file_meta": {
"content_id": "bddc57... |
509b8b1f-fc7c-4803-acd3-91f664d6cfd0 | angrypark/ybigta-algo-study | ch8/4_QUANTIZE/QUANTIZE_sm.cpp | #ifdef __linux__
#include <bits/stdc++.h>
#else
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#endif
std::string getStr()
{
std::string s;
std::getline(std::cin, s);
return s;
}
int getInt()
{
return std::stoi(getStr());
}
std::vector... | ALGO | 0.999729 | 4.587144 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2019-07-21T15:06:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1c233ebc... |
06ab6660-4cdc-42e5-9d7f-24d70a0cc5f5 | ansh23coder/CodeHelp-Supreme-3O-Coding-Problems | Arrays2/75SortColors.cpp | // https://leetcode.com/problems/sort-colors/
/*
class Solution {
public:
// 1st method(100%)-
// void sortColors(vector<int>& nums) {
// sort(nums.begin(), nums.end());
// }
// 2nd method (100%)-
void sortColors(vector<int>& nums){
int freq[3] = {0};
for(int x: nums)
... | ALGO | 0.999803 | 5.717154 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2025-07-01T06:33:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "257c2db0a1d... |
49569552-93aa-4715-a3c0-056fcaf20211 | Backstreet-05/Codeforces-Git | Contests/A_Alice_and_Books.cpp | #include <bits/stdc++.h>
using namespace std;
void inputAndOuptut()
{
int n;
cin>>n;
int ans;
vector<int> vec(n);
for (int i = 0; i < n; i++)
{
cin >> vec[i];
}
int max1= INT_MIN;
int idx1=-1;
for (int i=0; i<n; i++)
{
if (vec[i]>max1)
{
... | ALGO | 0.999914 | 4.225238 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2024-05-28T07:10: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": "a86963d696f... |
bb5b3e63-60cb-4bff-8fb8-c13dbfb23edf | ssafy10th18/algo-study | LKT/BOJ/SILVER/2567/2567.cpp | #include <cstring>
#include <iostream>
#define fio ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
using namespace std;
const int MAX = 101;
int N, ans;
int board[MAX][MAX];
void init() {
ans = 0;
memset(board, 0, sizeof(board));
}
void cover(int x, int y) {
for (int i = y; i < y + 10; i++) {
... | ALGO | 0.999358 | 4.111886 | {
"github_metadata": {
"branch": "main",
"commit_count": 520,
"repo_created_at": "2023-07-24T23:47:35.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "91ca1364d6b... |
f3d49b6b-62c9-41cb-831d-76e88b76848d | kirahollowed/Winter2022 | Hmwk/Assignment_6/4Standard_Deviation/main.cpp | /*
* File: main.cpp
* Author: <NAME>
* Created on: February 6 8:34 PM
* Purpose: Standard Deviation
*/
//System Libraries
#include <iostream> //Input/Output Library
#include <cstdlib> //Srand
#include <ctime> //Time to set random number seed
#include <cmath> //Math Library
#include <iomanip> //Fo... | ALGO | 0.996636 | 5.021712 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2022-02-04T01:12: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": "115bc616e44... |
4ffceb93-21eb-4c7a-9667-d3454249bf10 | NaOHCC/discopop-ParEval | src/code/01_dense_la_solve.cpp | /* Solve the linear system Ax=b for x.
A is an NxN matrix in row-major. x and b have N elements.
Example:
input: A=[[1,4,2], [1,2,3], [2,1,3]] b=[11, 11, 13]
output: x=[3, 1, 2]
*/
NO_INLINE void solveLinearSystem(std::vector<double> const& A, std::vector<double> const& b, std::vector<double> &x, size_t... | ALGO | 0.999936 | 5.638844 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2025-01-14T05:43: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": "f2090c40c7... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.