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 |
|---|---|---|---|---|---|---|---|
889e3646-4f89-4dfe-ad2a-ff0bb0b5d572 | flick-23/leetcode | 0329-longest-increasing-path-in-a-matrix/0329-longest-increasing-path-in-a-matrix.cpp | class Solution {
public:
// Directions for movement: {up, right, down, left}
static constexpr int directions[4][2] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
int rows, cols;
int dfs(int i, int j, vector<vector<int>>& matrix,
vector<vector<int>>& dp) {
if (dp[i][j] != -1)
ret... | ALGO | 0.999986 | 6.689449 | {
"github_metadata": {
"branch": "main",
"commit_count": 869,
"repo_created_at": "2024-10-13T04:15: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": "6c423ad93d... |
19820886-34db-41e5-86f1-fd69737fdd88 | Dimpal-Kalita/My-cp-codes | Atcoder/ABC 311/C_Find_it.cpp | /**
*
* author: <NAME>
*
*/
#include<bits/stdc++.h>
using namespace std;
#define md 1000000007
#define pb push_back
#define endl " \n"
#define F first
#define S second
#define sz(x) (int)(x).size()
#define inp(... | ALGO | 0.999868 | 3.385746 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2022-07-23T04:55: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": "9760bb8e0... |
4bd360eb-a145-43a6-9bd9-6ff42ea99427 | Camithilwen/Code-Cloning-Analysis | src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p02422/s206995686.cpp | #include <bits/stdc++.h>
int main() {
char str[1024];
char ope[256];
char obj[1024];
int q;
int a, b;
char temp;
scanf("%s", str);
scanf("%d", &q);
for(int i = 0; i < q; ++i) {
scanf("%s", ope);
if( strcmp("replace", ope) == 0 ) {
scanf("%d %d", &a, &b);
scanf("%s", obj);
... | ALGO | 0.962722 | 4.058561 | {
"github_metadata": {
"branch": "main",
"commit_count": 243,
"repo_created_at": "2025-06-06T16:57:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "3337e85e4b... |
09059072-923e-4922-8b4e-b887bcbc055d | hanae-mk/Data-Structures | 10.clsDblLinkedList.h |
#pragma once
#include <iostream>
using namespace std;
template <class T>
class clsDblLinkedList
{
protected:
int _Size = 0;
public:
class Node
{
public:
T Value = 0;
Node* Prev = NULL;
Node* Next = NULL;
};
Node* Head = NULL;
void InsertAtBeginning(T Value)
{
Node* NewNode = NULL;
NewNode =... | ALGO | 0.971606 | 4.303092 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-11-09T22:10: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": "4e415ef5cbf... |
5256fc91-8516-4a76-9618-7057bf68b664 | f4t4nt/competitive-programming | archive/CodeForces/Global/Global Rd21/fishingprinceplayswitharray.cpp | #include <algorithm>
#include <cmath>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <iomanip>
#include <iterator>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <s... | ALGO | 0.999937 | 3.904147 | {
"github_metadata": {
"branch": "main",
"commit_count": 83,
"repo_created_at": "2021-12-06T03:40:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd8eac75b15... |
7be92bf6-df54-4509-9629-a0edf9cf631e | zzsort/blarghrad | src/patches.cpp | /*
===========================================================================
Copyright (C) 1997-2006 Id Software, Inc.
This file is part of Quake 2 Tools source code.
Quake 2 Tools source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published b... | TOOL | 0.959938 | 4.345951 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2019-08-28T19:15:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 3,
"issues": 2,
"pull_requests": 1
},
"file_meta": {
"content_id": "bdee864b... |
27aa3a43-95eb-4e13-b470-c71200ff2cbe | nlhepler/pbccs | ConsensusCore/src/C++/Poa/RangeFinder.cpp |
#include <ConsensusCore/Poa/RangeFinder.hpp>
#include <ConsensusCore/Interval.hpp>
#include <algorithm>
#include <boost/graph/topological_sort.hpp>
#include <boost/optional.hpp>
#include <map>
#include <string>
#include <vector>
#include <utility>
#include "PoaGraphImpl.hpp"
#define WIDTH 30
#define DEBUG_RANGE_FIN... | ALGO | 0.998809 | 5.845108 | {
"github_metadata": {
"branch": "master",
"commit_count": 192,
"repo_created_at": "2015-08-02T20:31:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b1d74a88... |
55b9a742-efeb-480b-b00f-f0eeedb585ed | ishandutta2007/codeforces-o | ooops_no/normal/1372/B.cpp | #include<vector>
#include<map>
#include<algorithm>
#include<set>
#include<iostream>
#include<string>
#include<set>
#include<queue>
#include<random>
#include<unordered_set>
#include<cassert>
#include <iomanip>
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using... | ALGO | 0.999835 | 4.512431 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:45:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5e1e3b9259fd... |
4bf5df89-3512-4950-acd7-1994bd44dae5 | jicanta/Competitive-Programming | USACO/2017/February/Gold/WhyDidTheCowCrossTheRoadGold.cpp | #include <bits/stdc++.h>
using namespace std;
using tint = long long;
using ld = long double;
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define trav(a,x) for (auto& a: x)
using pi = pair<int,in... | ALGO | 0.999958 | 4.041336 | {
"github_metadata": {
"branch": "master",
"commit_count": 642,
"repo_created_at": "2020-01-27T20:27: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": "da7c337f... |
5891fa09-b9e0-4e79-87c7-d3bcac2ec85a | abdulrafayoc/Programming-Fundamentals-Fall-2025 | Task 10/Q1.cpp | #include <iostream>
using namespace std;
float twith, tdep;
int bank(float rate , float bal , int mon)
{
float dep, with;
for (int i = 0; i < mon; i++)
{
{
cout<<"\nEnter Money Deposited in Month "<<i+1 << " : ";
cin >> dep;
} while (dep < 0);
... | TOOL | 0.981189 | 3.579784 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-11-06T03:55:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "714e34084898... |
0866d247-d6e0-4643-b3d2-9232153ac6a8 | eshaansingla/DSA | Summer/greedy.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
vector<int> start = {1, 3, 0, 5, 8, 5, 9, 11};
vector<int> end = {2, 4, 6, 7, 9, 9, 12, 13};
vector<pair<int, int>> p;
for (int i = 0; i < start.size(); i++)
{
p.push_back({end[i], start[i]});
}
sort(p.begin(), p.end(), [](co... | ALGO | 0.999656 | 3.117089 | {
"github_metadata": {
"branch": "main",
"commit_count": 215,
"repo_created_at": "2024-08-05T11:53: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": "70a5d964a5... |
42972a3b-bed0-4b97-b857-28e576c4523e | krajsz/traffic-counter-opencv | 3rdparty/package_bgs/LBAdaptiveSOM.cpp | /*
This file is part of BGSLibrary.
BGSLibrary 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.
BGSLibrary is distributed in the hope that i... | ALGO | 0.967344 | 5.244489 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2017-04-06T11:13:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "beedde65e... |
43f2503d-ec2f-4456-99c1-b6ca6850078c | ns-vasilev/challenges | work_at_tech/Median of Row-wise Sorted Matrix/solution.cpp | /*
Median of Row-wise Sorted Matrix
Given an n*m matrix which is sorted row-wise, you need to find the median of the matrix.
Median of a group of numbers is the middle element after they are sorted. Both n and m are guaranteed to be odd numbers, therefore there’s only one middle number.
*/
int binary_search(std::v... | ALGO | 0.999999 | 6.631473 | {
"github_metadata": {
"branch": "master",
"commit_count": 865,
"repo_created_at": "2018-07-30T11:30:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "15dfd6de... |
74c46503-2ea4-4551-b4e1-e26607781b39 | manavkush/PracticeProblems | Codeforces/Contests/657(div3)/b.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef long long int lli;
typedef vector<int> vi;
typedef vector<long long int> vlli;
typedef stack<int> si;
typedef stack<long long int> slli;
#define FIO \
ios_base::sync_with_stdio(false); \
... | ALGO | 0.999831 | 3.678032 | {
"github_metadata": {
"branch": "master",
"commit_count": 127,
"repo_created_at": "2020-05-01T23:53: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": "dd796c1d... |
756cba95-a85f-46de-aa4c-a6d14ff4d896 | pkunjam/Data-Structures-and-Algorithms | Matrix/Boolean Matrix Problem.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
#define SIZE 1000
void booleanMatrix(int r, int c, int a[SIZE][SIZE]);
int main() {
int t;
cin >> t;
while(t--){
int r,c;
cin >> r >> c; //input the number of rows and columns
int a[SIZE][SIZE]... | ALGO | 0.999422 | 4.847016 | {
"github_metadata": {
"branch": "master",
"commit_count": 243,
"repo_created_at": "2019-12-21T12:38:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e084bdf... |
2182545d-1fe1-4838-bea0-8f6eaab6d9b0 | mkluza/C | Sortowanie/selection_sort.cpp | #include <iostream>
using namespace std;
int main() {
int x;
int *tab = new int[10];
int n = 0;
cout << "Wprowadz liczby do posortowania:... ";
while (cin >> x) {
tab[n] = x;
n++;
}
int min;
int poz;
for (int i = 0; i < n; i++) {
min = tab[i];
poz... | ALGO | 0.999688 | 3.950442 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2023-02-09T15:58: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": "5852c8bfa55... |
7b3e64e2-9b76-4f8b-83cd-0bf471eb65ba | Shikhar-S/Analysis-of-Competitive-Codebase | Data/Contest1243/all/29754375_64391927.cpp | #include <unordered_set>
#include <unordered_map>
#include <functional>
#include <algorithm>
#include <iterator>
#include <valarray>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <numeric>
#include <utility>
#include <string>
#include <cstring>
#include <cstdint>
#include <cstdlib>
#include <cstdio... | ALGO | 0.999972 | 3.86636 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2019-11-22T14:40: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": "ee2157e3e... |
2e3beff6-40aa-47e8-a7bb-5818fb9de35e | ishandutta2007/codeforces-s | shameimaru_aya/normal/451/E.cpp | #include<bits/stdc++.h>
using namespace std;
int n;
long long m , a[30] , inv = 1 , qwq , num , ans;
const int mod = 1e9 + 7;
inline long long exp( long long a , long long b )
{
long long ans = 1 , t = a;
while(b)
{
if(b & 1) ans = ans * t % mod;
t = t * t % mod; b >>= 1;
}
return ans;
}
inline long long C( lo... | ALGO | 0.999983 | 3.795235 | {
"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": "061820d9ed18... |
a91fae6f-8283-446f-a4fa-1f5c0b91e0ca | ridhigoyall/c-program1 | inlinefunction.cpp | #include<iostream>
using namespace std;
int product(int a ,int b){
static int c=0;//this executes only oncei;
c=c+1;//next time the funnction is run ,the value of c will be retaianed
return a*b+c;
}
int main(){
int a,b;
cout<<"Enter a value of a and b : "<<endl;
cin>>a>>b;
cout<<"The produ... | ALGO | 0.997406 | 4.469421 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-07-27T08:56: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": "fa9206b58103... |
e406fffa-7fc5-4ff4-a1a8-b1fe909a8622 | Zhima-Mochi/algorithm-problem-solving | cpp/802.find-eventual-safe-states.cpp | /*
* @lc app=leetcode id=802 lang=cpp
*
* [802] Find Eventual Safe States
*/
#include <vector>
using namespace std;
// @lc code=start
class Solution
{
vector<int> record; // -1 not seen, 0 pass, 1 cycle, 2 terminal
public:
vector<int> eventualSafeNodes(vector<vector<int>> &graph)
{
int width = g... | ALGO | 0.999924 | 6.536268 | {
"github_metadata": {
"branch": "main",
"commit_count": 128,
"repo_created_at": "2022-03-09T05:47:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eb54dee6f0... |
48698025-bdfc-40ab-9161-bbfe206d5a22 | henryiii/python-compiled-minicourse | 05-pybind/minuit2/src/FumiliMinimizer.cxx | // @(#)root/minuit2:$Id$
// Authors: <NAME>, <NAME>, <NAME>, <NAME> 2003-2005
/**********************************************************************
* *
* Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
* ... | ALGO | 0.913627 | 6.215163 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2020-05-06T03:22:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 30,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "75b189fa... |
475330e3-23bd-41c7-abd3-a08d1e05d3aa | that-sam/Simulazione_Numerica | Exercise_02/IntegralMC.cpp | #include "IntegralMC.h"
//METODO HIT OR MISS: //in ingresso estremi di integrazione, max funzione nell'intervallo, funzione da integrare, numero punti da usare
double IntegralMC::IntegralHoM(double xmin, double xmax, double fmax, const FunzioneBase *f, int npunti) {
int Ntot{0};
int Nhit{0};
double x{};
double y{... | ALGO | 0.972068 | 4.550052 | {
"github_metadata": {
"branch": "main",
"commit_count": 87,
"repo_created_at": "2022-06-20T17:27: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": "b68121a317f... |
97477f45-bff8-4090-8ce9-ad8a6e73aaf0 | Abhinav-Mahajan10/Computer-Architecture-Assignments | Assignment-3 final/IMT2020539_and_IMT2020553.cpp | #include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
//function for calulating hit and miss rates
//size -> size of cache
//block_size -> size of block
//n -> no of characters in filename + 1 , used for calulating the size of array for filename
//filename -> name of the trace file
void hit_miss_ra... | ALGO | 0.950809 | 3.014723 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-09-17T10:44: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": "cd1d421c9f... |
f0c3144e-1cc1-4970-9f35-ff151ae76d32 | utcoupe/Coupe2012 | executables/visio/tests/visio_detector/Perspective.h | #ifndef DEF_Perspective
#define DEF_Perspective
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/imgproc/imgproc.hpp>
using namespace cv;
class Perspective {
Size chess_board_size; // nombres de cases - 1
int cellsX;
int cel... | ALGO | 0.992358 | 5.108003 | {
"github_metadata": {
"branch": "master",
"commit_count": 766,
"repo_created_at": "2011-10-01T16:49:35.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 14,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc3661ba... |
faec4b6d-085e-4a16-a32b-5d061b234897 | HevaWu/Leetcode | Binary_Tree_Level_Order_Traversal.cpp | /*102. Binary Tree Level Order Traversal Add to List
Description Submission Solutions
Total Accepted: 156005
Total Submissions: 413098
Difficulty: Medium
Contributors: Admin
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary... | ALGO | 0.999994 | 6.257712 | {
"github_metadata": {
"branch": "master",
"commit_count": 1652,
"repo_created_at": "2016-05-16T16:53:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7090bd3... |
6d1b10b4-c92a-43c2-8aa6-58a0d69b9294 | EmmaJerrier/School-Projects | csc2710/labs/lab1.cpp | /*
Author: <NAME>
Date: September 11th 2022
Class: CSC2710
Path: ~/csc2710/labs
To compile: g++ lab1.cpp
ABOUT: In this program we had to implement the algorithms for sequential search, exchange sort, binary search, a recursive fibonacci function, and an iterative fibonacci function. I also used a function to fill an... | ALGO | 0.999631 | 5.739109 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2023-01-11T17:54: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": "146a026d654... |
cedfd3ac-f5a0-44c5-832f-5dcddfb3c7f5 | xkfz007/cpp_progs | algorithms/zeros_in_factorial.cc | /*
Compute the number of trailing zeros in factorial(N) for any 32-bit integer N > 0.
The num_zeros() function, below, is easily adaptable to support computation
of # of trailing zeros factorial of any 64-bit integer. Some results are shown below:
Fac(1) = 1 has 0 trailing zeros
Fac(2) = 2 has 0 trailing zeros
Fac(5)... | ALGO | 0.999788 | 6.99819 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2016-05-21T02:22: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": "c9fe05169... |
8ecfcf6d-ce6f-4c1d-9692-f30e2d166fef | AravindXD/VIT-DAA | LPS-3/q5/graph.cpp | #include <iostream>
#include <climits>
#include <vector>
#include <chrono>
#include <random>
#include <fstream>
using namespace std;
struct Result {
int startIdx, endIdx, sum, length;
};
Result calculateCrossSum(const vector<int>& arr, int low, int mid, int high) {
int maxLeftSum = INT_MIN;
int currentLe... | ALGO | 0.998948 | 6.099684 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-10-18T03:35: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": "3a340314b07e... |
1e564791-1da5-4cb6-9b8a-f2a37a06c593 | mCRL2org/mCRL2 | libraries/data/include/mcrl2/data/detail/rewrite/strategy_rule.h | // Author(s): <NAME>
// Copyright: see the accompanying file COPYING or copy at
// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
/// \file strategy_ru... | TOOL | 0.984573 | 6.607192 | {
"github_metadata": {
"branch": "master",
"commit_count": 20251,
"repo_created_at": "2018-04-07T15:35:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 99,
"forks": 44,
"issues": 60,
"pull_requests": 5
},
"file_meta": {
"content_id": "7556... |
0b57cfa4-7329-4b72-ab23-cf5ad9c166d1 | seasoncloud/HubID | GaussianPrior/model/NMFspatial2.cpp | #include <RcppArmadillo.h>
#include <cmath> // std::abs
#include <tuple>
#include <iostream>
using namespace Rcpp;
// [[Rcpp::depends(RcppArmadillo)]]
double error(arma::colvec y, arma::colvec mu) {
int ySize = y.size();
double sum = 0;
for (int i=0; i<ySize; i++) {
if (y[i] <= 0 || mu[i] <= 0) {
... | ALGO | 0.995796 | 5.624517 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2023-02-26T18:56: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": "77293f626b7... |
68b2d31d-3473-43f8-8902-2fb9e5b5cc28 | ayushgupta2959/InterviewBit | Day16 Sorting2/Assignment/Q1_Countofsmallernumbersafterself.cpp | /*
void merge(vector<int> &A,int l,int m,int h,vector<int> &B,vector<int> &index){
int i = l;int j = m+1;
vector<int> tB;
vector<int> tI;
while(i<=m && j<=h){
if(A[i]>A[j]){
for(int k=i;k<=m;++k) B[index[k]]++;
tB.emplace_back(A[j]);
tI.emplace_back(index[j]);... | ALGO | 0.999975 | 5.227874 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2019-05-30T14:27: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": "166503b66... |
a28dabc8-137b-4c71-8b91-1ac13fac858d | mejibyte/competitive_programming | NCPC/2011/primetime/primetime.cpp | using namespace std;
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cstdio>
#include <vector>
#include <cmath>
#include <queue>
#include <deque>
... | ALGO | 0.999866 | 3.40643 | {
"github_metadata": {
"branch": "master",
"commit_count": 355,
"repo_created_at": "2011-10-27T01:25:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 196,
"forks": 66,
"issues": 1,
"pull_requests": 2
},
"file_meta": {
"content_id": "62303... |
b7d364d3-eca8-4aaf-a067-2814209e4af2 | IBM/BlueMatter | svntrunk/src/untabbed/BlueMatter/analysis/src/Column.cpp | /* Copyright 2001, 2019 IBM Corporation
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following d... | ALGO | 0.97397 | 6.144549 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-04-10T14:41:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "685272a371b... |
fbbcfec0-8b5e-449e-9eac-ac59685d1b33 | royalpranjal/LeetCode | Find BottomLeftTreeValue.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
int getLevel(TreeNode* root, int level){
if(!root){
return level-1;
... | ALGO | 0.999996 | 5.378175 | {
"github_metadata": {
"branch": "master",
"commit_count": 308,
"repo_created_at": "2016-10-10T11:54:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 24,
"forks": 12,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "1818c8... |
4dd6c426-b677-4a6f-962a-408ce6f4f080 | luisademelo14/competitive_programming_lib | CODEFORCES/greetings.cpp | #include <bits/stdc++.h>
#include <unordered_map>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
typedef long long ll;
//https://codefo... | ALGO | 0.999672 | 4.311066 | {
"github_metadata": {
"branch": "main",
"commit_count": 80,
"repo_created_at": "2023-11-24T20: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": "b90bef01d75... |
120fd9ac-8484-402a-a24d-46cfd40c70f7 | VSladojevic/projects | System Software/SS Emulator Windows/SS Emulator/main.cpp | #include <stdio.h>
#include <string>
#include <regex>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <map>
#include "Structures.h"
#include "Emulator.h"
using namespace std;
void raiseError(string message){
cout << message << "\n";
getchar();
exit(-1);
}
void trim(string& lin... | TOOL | 0.928212 | 3.27109 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2018-08-27T22:57: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": "af84006b0... |
66893e00-f2f6-475b-a06d-e8d95a127112 | deep-astaad/codeforces | Feb 2023/C_Ice_and_Fire.cpp | /* Code by : <NAME> (deep_aman/astaad) */
#include <bits/stdc++.h>
using namespace std;
#define deep_aman ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define ll long long
#define int long long int
#define vll vector <ll>
#define pll pair <ll, ll>
#define vvll vector <vector <ll>>
#define vpll vecto... | ALGO | 0.999904 | 3.619418 | {
"github_metadata": {
"branch": "main",
"commit_count": 66,
"repo_created_at": "2022-07-21T20:23:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bfcb9c80b67... |
f4737b96-6428-4f0a-87b7-958d53913070 | Salmanahmed22/2D_Drawing | Source/Curves.cpp | #include <Windows.h>
#include <bits/stdc++.h>
#include "../Include/Utils.h"
#include "../Include/Curves.h"
using namespace std;
void DrawHermiteCurve(HDC hdc , int x1, int y1 , int u1, int v1 , int x2, int y2 , int u2, int v2, COLORREF c){
int hermiteMatrix[4][4] = {
{ 2, -2, 1, 1 },
{-... | ALGO | 0.997807 | 4.439255 | {
"github_metadata": {
"branch": "main",
"commit_count": 61,
"repo_created_at": "2025-05-27T18:22: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": "382941fcd4e... |
d6e47696-6d98-4a42-8f93-49619ff855d9 | mCRL2org/mCRL2 | libraries/pg/source/ParityGame.cpp | // Copyright (c) 2009-2013 University of Twente
// Copyright (c) 2009-2013 <NAME> <<EMAIL>>
// Copyright (c) 2009-2013 <NAME> <<EMAIL>>
// Copyright (c) 2009-2013 Eindhoven University of Technology
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// h... | ALGO | 0.999512 | 4.87236 | {
"github_metadata": {
"branch": "master",
"commit_count": 20251,
"repo_created_at": "2018-04-07T15:35:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 99,
"forks": 44,
"issues": 60,
"pull_requests": 5
},
"file_meta": {
"content_id": "07d6... |
d6b9a516-14d4-4742-9cdf-59ef30d71018 | LeandroAlm/NitroCppTest-LeandroAlmeida | NitroCppTest-LeandroAlmeida/NitroCppTest-LeandroAlmeida.cpp | // <NAME> Assessment
#include <iostream>
#include <vector>
#include <fstream>
#include "json.hpp"
#include "Helper.h"
#include "CustomRectangle.h"
using namespace std;
using JSON = nlohmann::json;
/// <summary>
/// Calculate intersections between rectangles
/// </summary>
/// <param name="_rects">All rectacngles to ... | TOOL | 0.945445 | 5.007679 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2025-07-09T17:46: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": "a9cd64cbd6c6... |
74684df9-4cef-4570-955f-32cb0553f189 | Lalokaeda/CPlusPlusLabs | Lab8/Task3/Source.cpp | #include <iostream>
#include <fstream>
#include <string>
void EncryptFileWithStateDemo(const std::string& filename, int key) {
std::ifstream in(filename, std::ios::in | std::ios::binary);
if (!in) {
std::cerr << "Ошибка открытия файла: " << filename << std::endl;
std::cout << "in.good(): " <<... | TOOL | 0.918456 | 5.198922 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2025-03-31T17:46: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": "bd2588908a... |
68fe9adc-8302-4a75-982a-81dea4c46353 | DarkTortoise/Crack_Code_Interview | 1_Array_and_Strings/OneAway.cpp | #include <cstddef>
#include <cstring>
bool oneReplace(const char *str1, const char *str2) {
size_t nDiffs = 0;
for (size_t index = 0; index < strlen(str1); index++) {
if (str1[index] != str2[index])
nDiffs++;
}
return nDiffs == 1;
}
bool oneEdit(const char *str1, const char *str2... | ALGO | 0.99609 | 5.323809 | {
"github_metadata": {
"branch": "master",
"commit_count": 223,
"repo_created_at": "2019-08-30T10:39: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": "c04ad740... |
0ef8395d-11aa-479b-a724-7f1e919ccca2 | NKI-CCB/bcm3 | src/likelihoods/LikelihoodODE.cpp | #include "Utils.h"
#include "LikelihoodODE.h"
#include "ODESolverCVODE.h"
#include "ProbabilityDistributions.h"
LikelihoodODE::LikelihoodODE(size_t sampling_threads, size_t evaluation_threads)
{
}
LikelihoodODE::~LikelihoodODE()
{
}
bool LikelihoodODE::Initialize(std::shared_ptr<const bcm3::VariableSet> varset, boos... | ALGO | 0.992101 | 6.307974 | {
"github_metadata": {
"branch": "main",
"commit_count": 298,
"repo_created_at": "2022-08-10T06:39:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ccff603d5e3... |
d8f820a1-db32-41ab-abab-d9cffdb75ca4 | gpeyre/numerical-tours | matlab/toolbox_graph/mex/perform_front_propagation_3d.cpp | /*=================================================================
% perform_front_propagation_3d - perform a Fast Marching front propagation.
%
% OLD : [D,S] = perform_front_propagation_2d(W,start_points,end_points,nb_iter_max,H);
% [D,S,Q] = perform_front_propagation_3d(W,start_points,end_points,nb_iter_max, H, L)... | ALGO | 0.999946 | 4.88947 | {
"github_metadata": {
"branch": "master",
"commit_count": 554,
"repo_created_at": "2013-10-22T08:19:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 826,
"forks": 330,
"issues": 28,
"pull_requests": 4
},
"file_meta": {
"content_id": "47e... |
fb75b885-c452-452d-b07f-e1cc79daac4b | Silverfang-707/DAA | LCS/lcs_cormen_algorithm.cpp | #include<iostream>
using namespace std;
#include<random>
#include<ctime>
#include<string.h>
#include<limits.h>
#include<vector>
void lcs_length(string x, string y, vector<vector<int> >&c, vector<vector<char> > &b)
{
int m,n,i,j;
m = x.length();
n = y.length();
for(i=1;i<=m;i++)
{
for(j=1;j<... | ALGO | 0.999448 | 4.484987 | {
"github_metadata": {
"branch": "main",
"commit_count": 61,
"repo_created_at": "2023-04-25T11:51:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e7805fc0a75... |
bd422638-9aa6-42a4-9b9d-706c7d7ee81a | bratek20/TemplateBST | BST_BaseImpl.h | #ifndef BST_BASE_IMPL_H
#define BST_BASE_IMPL_H
#include "BST_Base.h"
namespace struktury {
template< typename T, class Cmp>
BST<T, Cmp>::BST(const BST& bst) {
if (!bst.root) {
root = nullptr;
return;
}
root = bst.root->copy();
}
template< typename T, class Cmp>
BST<T, Cmp>::BST(BST&& bs... | TOOL | 0.9447 | 4.282939 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-05-28T20:52: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": "bd5cafb2d8... |
4b5d3e2c-6355-4608-985e-624de7e88892 | ssavi-ict/LightOJ-Solved-Problems | LightOJ - 1114 - Easily Readable.cpp | #include<bits/stdc++.h>
#define DIST(x1,x2, y1, y2) (((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))
#define DIST3D(x1,x2, y1, y2, z1, z2) (((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)) + ((z1-z2)*(z1-z2)))
#define CLR(a) a.clear()
#define VCLR(a, n) for(int i=0; i<=n+3; i++) a[i].clear()
#define SIZE(a) a.size()
#define ERASE(a, b) memset... | ALGO | 0.999154 | 3.439185 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2017-03-06T10:49:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b63fd7e46... |
f274bd2f-42f7-486c-b1a4-350f8331e8d7 | heeseokjung/boj | boj_1605.cpp | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int N;
char str[200010];
int RA[200010], tmpRA[200010];
int SA[200010], tmpSA[200010];
int cnt[200010];
int prevSA[200010];
int maxLCP = 0;
void input()
{
scanf("%d", &N);
scanf("%s", str);
}
void counting_sort(int k)
{
mems... | ALGO | 0.999995 | 4.363336 | {
"github_metadata": {
"branch": "master",
"commit_count": 484,
"repo_created_at": "2019-03-22T18:34: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": "132a4d91... |
b306c6b9-2f25-4588-bd4b-4eb9f74bcddf | Gerb11/Images-snakeDP | main.cpp | #include "cs1037lib-window.h" // for basic keyboard/mouse interface
#include "cs1037lib-button.h" // for basic buttons, check-boxes, etc...
#include <iostream> // for cout
#include "Cstr.h" // convenient methods for generating C-style text strings
#include <vector>
#include "Basics2D.h"
#include... | TOOL | 0.956472 | 4.727875 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2013-12-13T20:31: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": "48403b3e4e... |
1a0f95d1-65c6-42b7-90e3-797ad9235ff1 | memset0/OI-Code | 洛谷/P3355 骑士共存问题.cpp | // ==============================
// author: memset0
// website: https://memset0.cn
// ==============================
#include <bits/stdc++.h>
#define ll long long
#define rep(i,l,r) for (int i = l; i <= r; i++)
int read() {
int x = 0; bool m = 0; char c = getchar();
while (!isdigit(c) && c != '-') c = getchar();
... | ALGO | 0.999927 | 3.321906 | {
"github_metadata": {
"branch": "master",
"commit_count": 294,
"repo_created_at": "2018-07-31T14:56:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bfae5af... |
6cfe14ce-0ee1-45f2-839b-8d4f0d8db259 | rvcervan/ICS-46-CPP | HW6/RVCERVAN/TreeNode.cpp | using namespace std;
#include <iostream>
#include <string>
#include <map>
#include <iterator>
template <typename KeyType, typename ElementType>
class SearchTree
{
struct TreeNode{
KeyType key;
ElementType info;
TreeNode* left, * right;
//int nodesCreated = 0;
TreeNode(KeyType new_key, ElementType new_info,... | ALGO | 0.999009 | 4.00298 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-08-09T05:21:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d6deb0128f1c... |
19f1902c-6e44-426f-b5a6-0ec0d9f120ad | grigolin/ifsp-resources | estrutura-de-dados/PilhaElemMeio/pilha.cpp |
#include "pilha.h"
#include <iostream>
#include <cstdlib>
using namespace std;
pilha::pilha() {
}
pilha::pilha(const pilha& orig) {
}
pilha::~pilha() {
}
bool pilha::vazio(struct nodo *campo) {
return campo == NULL;
}
void pilha::inserir() {
int x;
cout << "\nEntre com o numero a inserir: ";
cin... | ALGO | 0.988633 | 4.757392 | {
"github_metadata": {
"branch": "main",
"commit_count": 207,
"repo_created_at": "2023-04-06T13:47:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6cea0a7396... |
fac721eb-7ce5-4ace-9507-a9cd87d8b597 | ishandutta2007/codeforces-j | jakube/normal/658/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define ALL(v) v.begin(),v.end()
#define FOR(I, N) for (int I = 0; I < (N); ++I)
#define FORR(I, A, B) for (int I = (A); I < (B); ++I)
const double EPS = 1e-4;
const long double PI = acos((long double)-1.0);
const long long int MOD = 1e9 + 7;
typedef long long int lint;... | ALGO | 0.999987 | 3.420614 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:42: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": "9d773603d6d0... |
f2f7a55d-8607-4a6c-ab0a-ec2a9698b865 | peterdjlee/labs_testing | lab_02/fibonacci.cpp | /*
Author: <NAME>
Course: CSCI-133
Instructor: <NAME>
Assignment: Lab2D
Up to the 60th digit of the Fibonacci sequence is printed.
*/
#include <iostream>
using namespace std;
int main() {
int fib[60];
fib[0] = 0;
cout << fib[0] << endl;
fib[1] = 1;
cout << fib[1] << endl;
// Prints fibonac... | ALGO | 0.999149 | 4.23698 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-09-17T14:20: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": "d523ecc6d7... |
f1c962a9-c013-4cd1-a92d-2bc99e68c001 | simsong/SBook5 | libsbook/searcher.cpp | /*
* searcher:
* create a tre and rapidly search it.
*/
using namespace std;
#include <stdio.h>
#include <string>
#define WORDS "/usr/share/dict/words"
class tre {
public:
tre();
void add(const u_char *buf,void (*action)(class tre *));
void add(const char *buf,void (*action)(class tre *)) { add((cons... | ALGO | 0.986513 | 4.69876 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2013-04-11T22:11:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "33aef743fd... |
d848d571-dac1-4577-999c-4087f3bbe6e8 | codycann/eecs475_dsa | Break It/SPECK/SPECK_Submission/SPECK_Submission/SPECK128_256.cpp | #include <iostream>
#include <assert.h>
#include <random>
#include <time.h>
#include <limits.h>
#include <string.h>
#include <thread>
#include <iomanip>
#include <future>
#include <unistd.h>
#define ull unsigned long long
using namespace std;
struct Parameters
{
int block_size;
int key_size;
int word_size;
int k... | ALGO | 0.994977 | 4.933035 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2014-03-27T23:42:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cb8d0f8e1... |
7ae7af17-2bdc-40d1-a5c8-ff08e75a3a09 | eaburns/search | segments/mkinst.cc | // © 2013 the Search Authors under the MIT license. See AUTHORS for the list of authors.
#include "segments.hpp"
#include "../utils/utils.hpp"
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cassert>
using namespace geom2d;
static unsigned int Nsegs = 10;
static unsigned int Width = 100;
static unsign... | TOOL | 0.953216 | 4.552475 | {
"github_metadata": {
"branch": "master",
"commit_count": 1210,
"repo_created_at": "2013-06-20T14:23:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 34,
"forks": 20,
"issues": 28,
"pull_requests": 0
},
"file_meta": {
"content_id": "6152... |
7dd0ce8b-5b36-4826-8274-487aa1da85c9 | cocos2d/cocos2d-x | extensions/Particle3D/PU/CCPUMeshSurfaceEmitter.cpp | /****************************************************************************
Copyright (C) 2013 <NAME>. All rights reserved.
Copyright (c) 2015-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any pe... | TOOL | 0.954096 | 5.24548 | {
"github_metadata": {
"branch": "v4",
"commit_count": 37362,
"repo_created_at": "2010-11-18T23:17:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 18619,
"forks": 7068,
"issues": 1413,
"pull_requests": 197
},
"file_meta": {
"content_id": ... |
7933eea3-06e5-4c1d-b513-447647a7af73 | Manik-Aggarwal/Leetcode | 222-count-complete-tree-nodes/222-count-complete-tree-nodes.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.99992 | 6.33238 | {
"github_metadata": {
"branch": "main",
"commit_count": 611,
"repo_created_at": "2021-12-24T13:15: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": "78b86bbc5d... |
5f9dda6c-5039-4af4-af7c-f5fee5761e4d | vgladush/CPPBC | Jenkins_18e4/stl_small_tasks/project/stl_task.cpp | #include "stl_task.h"
#include <unordered_set>
#include <algorithm>
#include <iostream>
void remove_elem_by_value(Map& m, int value)
{
for (auto it = m.begin(); it != m.end();)
{
if (it->second == value)
it = m.erase(it);
else
++it;
}
}
bool if_spece(char l, char r) {
return l == r && std::isspace(l);
}... | ALGO | 0.945679 | 4.77831 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2018-11-23T20:21:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "be632b521... |
118da188-bee3-47c8-bee2-ade62b79ce3e | yooniversal/PS | BOJ/dfs, bfs/13023.cpp | //13023
#include <iostream>
#include <string>
#include <cstring>
#include <cstdio>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <cmath>
#include <algorithm>
#include <map>
using namespace std;
#define INF 1000000001
#define MAX 2001
typedef long long ll;
typedef vector<int> vi;
typedef... | ALGO | 0.999905 | 4.465265 | {
"github_metadata": {
"branch": "master",
"commit_count": 664,
"repo_created_at": "2020-04-24T15:46:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b9be330f... |
a1d4fad7-4812-486c-9916-a13e8a49dd42 | fengvyi/LeetCode | C++/852. Peak Index in a Mountain Array.cpp | class Solution {
public:
int peakIndexInMountainArray(vector<int>& A) {
int n = A.size();
// O(n)
for (int i = 1; i < n - 1; ++i) {
if (A[i] > A[i - 1] && A[i] > A[i + 1]) {
return i;
}
}
// O(logn)
int l = 1, r = n - 2... | ALGO | 0.999982 | 5.532116 | {
"github_metadata": {
"branch": "master",
"commit_count": 1188,
"repo_created_at": "2017-08-06T09:52:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 144,
"forks": 39,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "ea87... |
42fbded6-58e5-40fb-b3bf-fb2b7f28472d | NabeelSohail-30/SAF-Batch-2022-23-XII-C-Language-Class-Code | 47_Selection Sort and Linear Search.cpp | #include <stdio.h>
void selectionSort(int arr[], int n) {
int i, j, minIndex, temp;
for (i = 0; i < n-1; i++) {
minIndex = i;
for (j = i+1; j < n; j++) {
if (arr[j] < arr[minIndex]) {
minIndex = j;
}
}
temp = arr[minIndex];
arr[min... | ALGO | 0.999986 | 4.812003 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2022-12-02T21:21: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": "48cb32da40... |
f236ba12-a5d1-4693-9332-bac134cb9dfb | tanvirhossains/c_plus_problem_solving | transpose.cpp | #include<iostream>
#include<conio.h>
using namespace std;
int main()
{
// matrix to transpose
int numOfRow, numOfCol,row,n, col, matrix[10][10], transpose[10][10];
cout<< "Give row and column number:";
cin>>numOfRow>>numOfCol;
//inputing matrix from user
for(row=0; row<numOfRow; row++)
{
... | ALGO | 0.999165 | 3.892705 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-04-27T07:19: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": "c363bbe0dfed... |
8e7bb1d5-9c92-43cd-b4dd-02cd2b5957f9 | Horolsky/senet | app/core/xtc/src/xtc.emax.cpp | #include "xtc.emax.hpp"
#include "xtc.dice.hpp"
#include <atomic>
#include <chrono>
namespace xtc
{
namespace bruteforce
{
const int FRAME = 2;
Eval g_eval;
int g_stopdepth;
int g_timetowork;
bool g_stopflag;
int g_jobsdone;
int g_threads_created;
std::atomic<int> a_nodes_visited;
std::atomic<int> a_leaves_visited;... | ALGO | 0.999833 | 6.581396 | {
"github_metadata": {
"branch": "main",
"commit_count": 207,
"repo_created_at": "2020-11-07T21:10: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": "b5a4d2e161... |
c7c3ffe4-5ad9-401d-84cd-09771014063e | codeakki/DSA | Roman_To_Int.cpp | #include <bits/stdc++.h>
using namespace std;
int RomanToInt(string s)
{
unordered_map<string, int> mpp;
mpp.insert({"I", 1});
mpp.insert({"V", 5});
mpp.insert({"X", 10});
mpp.insert({"L", 50});
mpp.insert({"C", 100});
mpp.insert({"D", 500});
mpp.insert({"M", 1000});
int sum = 0;
... | ALGO | 0.999864 | 5.087094 | {
"github_metadata": {
"branch": "main",
"commit_count": 96,
"repo_created_at": "2021-05-18T14:42:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "564edb06a31... |
8d4bb265-7c3e-425f-81e5-bbd6c5879727 | AmitJNV-IIIT/Leetcode-contest--Problems | 1240-stone-game-ii/1240-stone-game-ii.cpp | class Solution {
public:
int helper(int i, int M, vector<int>& piles, vector<vector<int>>& dp, vector<int>& suffixSum) {
int n = piles.size();
// Base case: If we're at the last pile, return the sum of the remaining piles
if (i >= n) {
return 0;
}
// If we've already... | ALGO | 0.999912 | 5.573203 | {
"github_metadata": {
"branch": "main",
"commit_count": 1414,
"repo_created_at": "2024-07-27T17:44: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": "fb4dae929... |
548350f6-1aac-4342-830a-f9dd7829b717 | mkaouer/Code-Smells-Detection-in-JavaScript | JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/362764/shogun-3.2.0/shogun-3.2.0/examples/undocumented/libshogun/minibatchKMeans.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.
*
* This is an example of mini-batch KMeans compared with class... | DATA | 0.93305 | 6.321608 | {
"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": "f821fb37... |
945d12ec-5d13-419c-85fc-4df963a2b218 | SewerynKaminski/AdventOfCode | year2021/day01/day_01.cpp | #include "day"
//---------------------------------------------------------------------------//
namespace aoc::YEAR::DAY {
//---------------------------------------------------------------------------//
// Test data
std::string testinput (
R"(199
200
208
210
200
207
240
269
260
263)" );
inline std::istream& test_... | ALGO | 0.99927 | 5.122399 | {
"github_metadata": {
"branch": "main",
"commit_count": 379,
"repo_created_at": "2021-12-16T17:59:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5653e8ae24... |
b295029c-3962-4ada-be94-8707ad1f6e83 | Xilinx/XRT | src/runtime_src/core/common/xclbin_parser.h | /**
* Copyright (C) 2019-2022 Xilinx, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. A copy of the
* License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | TOOL | 0.933701 | 6.80952 | {
"github_metadata": {
"branch": "master",
"commit_count": 8326,
"repo_created_at": "2018-05-30T22:04:22.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 608,
"forks": 493,
"issues": 123,
"pull_requests": 9
},
"file_meta": {
"content_id": "bf... |
c3f5ffda-9e83-4764-b460-9daaa9feecd4 | jgillham/AwesomeRobot | exp/ackerman/ackerman_ino.ino | #include <Servo.h>
#define NDEBUG // Uncomment to turn off debugging mode.
Servo servo_FL; // create servo object to control a servo
Servo servo_FR;
Servo servo_BL;
Servo servo_BR;
int potpin = 0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin
#defi... | ALGO | 0.969366 | 4.63015 | {
"github_metadata": {
"branch": "master",
"commit_count": 154,
"repo_created_at": "2012-11-20T13:01:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6505a88b... |
2d896566-225c-4938-b1c2-49faae77d7f9 | codewithaman07/CSES-Solutions | Removing Digits.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define f(x,n) for(ll i = x ; i<n ; i++)
#define all(x) x.begin(),x.end()
const int N = 2e5+20;
ll n, arr[N], d[N][4];
void solve() {
ll n; cin>>n;
vector<ll>dp(n+1, 1e... | ALGO | 0.999877 | 4.787911 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2025-02-04T09:22: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": "e2db38380c2... |
240630f9-3fac-4166-b141-566b67f107ea | RUTuna/2021_CSE221_DS | assignment1/LinkedList.h | // CSE221 Assignment 1
#ifndef LinkedList_h
#define LinkedList_h
#include <typeinfo>
#include <iostream>
using namespace std;
template <typename Type>
struct Node { // Node 구조체 선언
public:
Type data;
struct Node<Type> *link = NULL; // Null로 초기화. Node를 link할 거니까 Type
};
template <typename Type>
class LinkedList
... | ALGO | 0.999166 | 5.093863 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2023-03-18T05:39: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": "51053270f... |
ee88e862-5379-48d8-9f47-fb8d81920b94 | Wizmann/ACM-ICPC | AtCoder/AtCoder Beginner Contest 159/D.cc | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <map>
#include <set>
#include <deque>
#include <string>
using namespace std;
typedef long long llint;
void print() { cout << "\n"; }
template <typename...T, typename X>
v... | ALGO | 0.999846 | 3.59798 | {
"github_metadata": {
"branch": "master",
"commit_count": 3480,
"repo_created_at": "2011-12-19T02:04:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 63,
"forks": 29,
"issues": 97,
"pull_requests": 0
},
"file_meta": {
"content_id": "146b... |
6638bbae-3fa6-4d14-a680-74c85510e7b3 | bishwathakur/CodeForces | cf 982(div 2)/stralinsort.cpp | #include <iostream>
#include <vector>
using namespace std;
// Function to perform Stalin sort
vector<int> stalinsort(const vector<int> &a) {
vector<int> b;
if (!a.empty()) {
b.push_back(a[0]); // Start with the first element
}
// Iterate through the input array
for (int i = 1; i < a.size(... | ALGO | 0.999911 | 6.923326 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2024-10-26T14:43: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": "5cea6713862... |
1690c954-425d-4854-aad1-d4e7c08c12df | sonald/leetcode | binary-tree-maximum-path-sum.cc | #include <iostream>
#include <vector>
#include <cmath>
#include <list>
#include <unordered_map>
#include <random>
#include <map>
#include <algorithm>
using namespace std;
struct TreeNode {
int val;
TreeNode *left{nullptr}, *right{nullptr};
TreeNode(int x, TreeNode *l=nullptr,TreeNode *r=nullptr): val{x}, l... | ALGO | 0.999983 | 5.550466 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2014-12-12T03:42: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": "a836776e0... |
da880f7f-a88c-4460-9307-d3fa6c047ce3 | SanyamGoel13/codepractice-cpp | treesfull.c++ | #include <iostream>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <stack>
#include <climits>
#include <vector>
using namespace std;
int maximum = 0;
int maxi = INT_MIN; // global variable
class node
{
// properties
public:
int data;
node *left;
node *right;
// cons... | ALGO | 0.999966 | 3.646201 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-10-11T21:19: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": "61a087842308... |
f63af5bc-12b4-4854-bd44-f4592820290d | xehoth/OnlineJudgeCodes | BZOJ/BZOJ1597-土地购买-斜率优化.cpp | /**
* Copyright (c) 2017, xehoth
* All rights reserved.
* 「BZOJ 1597」土地购买 11-09-2017
* 斜率优化
* @author xehoth
*/
#include <bits/stdc++.h>
namespace IO {
inline char read() {
static const int IN_LEN = 1000000;
static char buf[IN_LEN], *s, *t;
s == t ? t = (s = buf) + fread(buf, 1, IN_LEN, stdin) : 0;
... | ALGO | 0.999606 | 3.81943 | {
"github_metadata": {
"branch": "master",
"commit_count": 401,
"repo_created_at": "2017-08-26T02:49:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca638efb... |
88d104b9-e4de-4bbe-aedd-b7490e871d6f | alibaba-edu/mpc4j | mpc4j-native-tool/ntl_poly/edu_alibaba_mpc4j_common_tool_polynomial_zp64_NtlZp64Poly.cpp | //
// Created by <NAME> on 2022/8/5.
//
#include "edu_alibaba_mpc4j_common_tool_polynomial_zp64_NtlZp64Poly.h"
#include "ntl_zp64.h"
JNIEXPORT jlongArray JNICALL Java_edu_alibaba_mpc4j_common_tool_polynomial_zp64_NtlZp64Poly_nativeInterpolate
(JNIEnv *env, jclass context, jlong jPrime, jint jNum, jlongArray j... | ALGO | 0.994286 | 5.610256 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2022-08-01T06:39:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 235,
"forks": 54,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "12f56e204... |
2d184920-078c-48ef-b79f-c028f24050ab | nthnjustice/csClass | Comp11/proj3/WordFreqList.h | /***********************************************************************/
/* WordFreqList Interface */
/***********************************************************************/
/* A minimal implementation of linked lists. */
/* Author: <NAME> ... | ALGO | 0.995917 | 5.322951 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2015-06-24T17:13: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": "ddebeb9a8... |
f948b76b-3639-445c-aea8-41a44262680d | ozobianwadibia/C867_Some-Useful_Notes | 6.2.1_vectors.cpp |
#include <iostream>
#include <string>
#include <vector>
// #include <cmath>
// #include <iomanip>
// #include <cctype>
// #include <cstdlib>
using namespace std;
int main()
{
vector<int> oldestPeople(5);
int nthPerson; // User input, Nth oldest person
oldestPeople.at(0) = 122; // Died 1997 in France
... | ALGO | 0.994483 | 3.539654 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2021-01-30T23:24: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": "8d88d1b25... |
86e8bf32-26b2-4929-a684-7b74c558a8dc | RichardFP8/SCILabs | fouriersawtooth.cpp | // S T I L L N E E D S I M P R O V E M E N T S
#include <cmath>
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
double pi = 3.1415926536;
double sawtooth(double x, int nmax) {
double sum = 0;
for (int n = 1; n <= nmax; n++) {
sum += pow(-1, n + 1) / (n * sin(n * x));
}
ret... | ALGO | 0.928287 | 4.653769 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2025-02-25T21: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": "50807b12d2e... |
f52aac60-7fb1-44b8-98b4-fc423857a0d6 | GGapa/vscode | program/CodeForces/CF1972/D1.cpp | #include <bits/stdc++.h>
#define rep(i, a, b) for(int i = (a), stOwxc = (b); i <= stOwxc; i++)
#define per(i, a, b) for(int i = (a), stOwxc = (b); i >= stOwxc; i--)
using namespace std;
typedef long long ll;
using VI = vector<int>;
#define int long long
void solve() {
int n, m; cin >> n >> m;
int cnt = 0, mx = ... | ALGO | 0.999935 | 4.553528 | {
"github_metadata": {
"branch": "main",
"commit_count": 191,
"repo_created_at": "2023-11-17T05:37: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": "bf552c7210... |
21d47e45-31c0-423b-b123-5640cd0d238d | fabbrito/leetcode-cpp | Challenges/src/C79_Word_Search/Solution79.cpp | #include "pch.h"
#include "Solution79.h"
namespace leetcode_79 {
using namespace std;
class Solution {
public:
bool exist(vector<vector<char>>& board, string word) {
for (size_t i = 0; i < board.size(); ++i) {
for (size_t j = 0; j < board[0].size(); ++j) {
if (board[i][j] == word[0] && dfs(i, j, board, wor... | ALGO | 0.998815 | 6.782579 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2023-10-17T02:43: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": "bc85673b6... |
fa0bf079-0a30-4b9f-a2a4-eccf0f40c336 | AayushBhusari/AlienShooter | AlienShooter/AlienShooter.cpp | #include <iostream>
#include <vector>
#include <raylib.h>
#include "raymath.h"
#include <cmath>
using namespace std;
class Guy {
public:
Vector2 position = { 600, 400 };
void Shoot(float angle, vector<Vector2>& bulletPositions, vector<Vector2>& bulletVelocities) {
Vector2 direction = { cosf(angle), si... | TOOL | 0.940409 | 5.136014 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2025-06-05T07:43: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": "9fe25f0bcc... |
4f15ea30-8c1b-434d-ab63-50030d253e74 | lychees/ACM-Training | Note/集训队作业/2014/作业1/试题泛做/ytl13508111107/ytl/题目与程序/D6541. A Major Problem/major.cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std;
string diao[15][8]={
{"C","D","E","F","G","A","B","C"},
{"G","A","B","C","D","E","F#","G"},
{"D","E","F#","G","A","B","C#","D"},
{"A","B","C#","D","E","F#","G#","A"},
{"E","F#","G#","A","B","C#","D#","... | ALGO | 0.999135 | 3.777385 | {
"github_metadata": {
"branch": "master",
"commit_count": 307,
"repo_created_at": "2015-09-15T06:34:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 109,
"forks": 20,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e90d4... |
ee4b7790-3939-4acd-91d4-da24f544e9c0 | decisivemoments/recruitment-2022-spring | task3-gemm/data/makedata.cpp | #include <random>
#include <fstream>
#include <string>
std::default_random_engine e;
std::uniform_int_distribution<int> u(-1000, 1000);
int a[2048][2048], b[2048][2048];
void generate(int size) {
std::ofstream ofs;
ofs.open(std::to_string(size) + "/a");
for (int i = 0; i < size; ++i) {
for (int j ... | TOOL | 0.968191 | 3.783481 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2022-05-10T03:26: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": "d507b91e3b6... |
89e50724-31b9-4bea-b614-4b9819252237 | DorifutoBoyz/FP-Strukdat | FP.cpp | #include <iostream>
#include <string>
#include <ctime>
#include <unordered_map>
#include <vector>
class Keadaan {
public:
Keadaan() : kekenyangan(0), lapar(true), kotor(false), bosan(false), jalanCounter(0), totalJarak(0) {}
void waktuBerlalu(int waktu) {
kekenyangan -= waktu;
updateStatus();
... | TOOL | 0.950109 | 5.907048 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-12-15T13:59: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": "d886602d3f0b... |
d149f266-836e-4939-bef1-002c97aa2c55 | haris-mujeeb/Cpp-Basic | Text-Games/guess_the_number_2.cpp | using namespace std;
#include <iostream>
#include <tuple>
#include <ctime>
#include <cstdlib>
#include <vector>
#include <algorithm>
const int RANGE = 100;
const std::string GUESS_HIGHER_HINT = "Guess higher.";
const std::string GUESS_LOWER_HINT = "Guess lower.";
const std::string YOU_WON_MESSAGE = "Congrats, you ... | ALGO | 0.999195 | 3.816231 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2023-04-08T14:49: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": "b126381f51d... |
4037930f-5f99-40fd-9066-ab5c060dd85c | jongwuner/ps-study | exercise/BOJ/2226.cpp | #include <cstdio>
enum {m = 1000000000, size = 40};
class DP
{
public:
int data[size];
int power[size];
DP()
{
for (int i = 0; i < size; i++)
data[i] = power[i] =0;
power[0] = 1;
}
void next()
{
int borrow = 0;
for (int i = 0; i < size; i++)
{
data[i] = power[i] - data[i] - borrow;
if (dat... | ALGO | 0.999978 | 3.738035 | {
"github_metadata": {
"branch": "master",
"commit_count": 119,
"repo_created_at": "2018-11-07T15:03:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "f7b11b3a... |
f2abb3f4-023e-415b-850a-f62e593acf82 | Fogotcheck/CppLess | Vasiliev-6_edition/Chapter_4/Task_1/AppMain/Main.cpp | #include "Main.h"
using namespace std;
uint64_t fibonacci(int n);
int main(void)
{
cout << "Program with the function of calculating a number from the Fibonacci sequence. "
<< endl
<< "The function argument is ordinal number of numbers in sequence "
<< endl;
int Num = 0;
cin >> Num;
try {
uin... | ALGO | 0.985308 | 4.737326 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2024-10-29T18:41: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": "48c0a22eeb5... |
4cfae9f3-f470-474f-92c4-282c515ce05f | osamahatem/CompetitiveProgramming | TopCoder/EllysScrabble.cpp | #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cst... | ALGO | 0.999952 | 4.740025 | {
"github_metadata": {
"branch": "master",
"commit_count": 125,
"repo_created_at": "2017-12-09T14:02:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e76539e9... |
259145cf-753c-47fe-9c82-126b48d67aff | xiaolindong/cppWorkspace | workspace_c++/Skill_Set_TSP/src/EdgeManager.h | /*
* EdgeManager.h
*
* Created on: Mar 29, 2012
* Author: eia2
*/
#ifndef EDGEMANAGER_H_
#define EDGEMANAGER_H_
#include <map>
class EdgeManager
{
private:
map<pair<int, int>, int> EdgeToLabel;
map<int, pair<int, int> > LabelToEdge;
public:
int GetLabel (int u, int v);
pair<int, int> GetEdgeByLab... | TOOL | 0.976096 | 5.636218 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-12-19T04:16: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": "1f45fdbcc8... |
435b519a-ee75-45f9-8f3b-6bbadea5cf32 | sky11fca/Homework-OOP | w3/1/source/Math.cpp | #include "../headers/Math.h"
#include <cstdarg>
#include <cstring>
int Math::Add (int x, int y)
{
return x+y;
}
int Math::Add (int x, int y, int z)
{
return x+y+z;
}
int Math::Add (double x, double y)
{
return static_cast<int>(x+y);
}
int Math::Add (double x, double y, double z)
{
return static_cast... | TOOL | 0.94369 | 5.385312 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-03-05T16:15: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": "68a5fdfdc15... |
7750dd42-50c9-4c42-9efa-19f023e9084b | YvensLG/maratona | Tremdle/7/d.cpp | #include <bits/stdc++.h>
using namespace std;
#define _ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define all(v) (v).begin(), (v).end()
#define int long long
// achar o maior grafo de modo que há no max um ciclo por componente
// ou seja, MST + 1 aresta p cada comp
const int MAX = 200'005;
vector<tuple<... | ALGO | 0.999947 | 4.395932 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2024-09-06T19:51:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f16931dff4... |
933f80dc-8922-4c9e-bd27-99e8d7dddc64 | dhjp123/gfg | Medium/Partitions with Given Difference/partitions-with-given-difference.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
int countPartitions(int n, int d, vector<int>& a) {
// Code here
int sum=0;
int zero=1;
for(int i=0;i<n;i++)
{sum+=a[i];if(a[i]==0)zero++;}
if(su... | ALGO | 0.999792 | 5.804535 | {
"github_metadata": {
"branch": "main",
"commit_count": 1347,
"repo_created_at": "2022-12-07T17:30:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3cd0151b6... |
2244ae0c-5ee4-4083-acd2-05de04fc4a22 | ishandutta2007/codeforces-r | rns_cus/normal/698/F.cpp | #include<bits/stdc++.h>
using namespace std;
#define N 1000100
#define mod 1000000007
bitset <N> vis;
int arr[N], n;
int p[1000], cnt, cur[N], pre[N];
void get_prime(){
for(int i = 2; i <= 1000; i ++) if(!vis[i]) {
p[cnt ++] = i;
for(int j = i * i; j <= N; j += i) vis[j] = true;
}
}
int s[N], cp[N], f[N], gas... | ALGO | 0.999969 | 4.438884 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:58:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f3382d37bf71... |
5cdf3540-7f62-4a18-b6dd-7fc73dcf74b4 | KajetanMieloch/CppExercises | Sem2/Lista4/zad4.cpp | #include <time.h>
#include <iostream>
using namespace std;
int wygenereujZakres(int zakres){
srand(time( NULL ) );
int rng = (int) rand() % zakres + 1;
return rng;
}
int gra(bool nowyZakres, int zakres){
int liczba, proby = 1;
if(nowyZakres){
cout << "wybierz zakres: ";
cin >> zakres;
... | ALGO | 0.927965 | 3.476615 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-09-19T13:51:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9f11377b0db0... |
9b9ac96e-bb1c-4a9f-ba52-44c56c73e7c3 | mkmpib/decode | DecodeWork/2dArray/rollNumberAndMarks.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int row = 4; // because we only want rollnumber an marks
int coulmn;
cout << "Enter the number students: ";
cin >> coulmn;
int arr[row][coulmn];
cout << "Enter the first roll number then maarks: ";
for (int i = 0; i < row; i++) //... | ALGO | 0.997058 | 3.956065 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2023-08-30T15:30: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": "f4de58bcf9a... |
eabfadac-b2d9-48bd-a991-28577f09b2ea | doldre/ACM | codeforces/round362/a.cpp | /************************************************
*Author :mathon
*Email :<EMAIL>
*************************************************/
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include ... | ALGO | 0.999889 | 3.985609 | {
"github_metadata": {
"branch": "master",
"commit_count": 91,
"repo_created_at": "2016-04-09T08:35:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb667aef5... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.