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 |
|---|---|---|---|---|---|---|---|
5b8f7cc8-5ec8-4ddd-a0c0-c337cd4bc374 | d-raith/frAISers_aadc_2018 | src/aadcUser/BirdseyeTransform/DijkstraGoalpointExtractor.h | #pragma once
#include <vector>
#include "stdafx.h"
#include "../PinClasses/customtypes.h"
void getGoalPoints(cv::Mat* image);
class DijkstraGoalpointExtractor {
private:
int segmentation_channel = 0;
int cost_channel = 2;
int goal_radius = 75;
unsigned int start_position_y = 13;
int start_rectan... | ALGO | 0.994448 | 4.145048 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-11-18T08:55:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5de0a3762c... |
2132e855-1230-4180-8e27-393fe3e5ce20 | ocfbnj/Exercises | luogu/P1216.cpp | #include <iostream>
#include <algorithm>
int arr[1000][1000];
int saved[1000][1000];
int n;
int resolve1(int i, int j) {
if (i >= n) return 0;
if (saved[i][j] != -1) return saved[i][j];
int sum1 = arr[i][j] + resolve1(i + 1, j);
int sum2 = arr[i][j] + resolve1(i + 1, j + 1);
saved[i][j] = std::ma... | ALGO | 0.999979 | 4.08857 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2020-04-04T15:42: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": "c08ea6dad... |
7c08401c-0654-4a04-b795-7dcfe5e44495 | haopham24/CTDL-GT2021 | CTDL_day_con_lap_lai_dai_nhat.cpp | /*
Cho xâu ký tự S. Nhiệm vụ của bạn là tìm độ dài dãy con lặp lại dài nhất trong S. Dãy con có thể chứa các phần tử không liên tiếp nhau.
Input:
Dòng đầu tiên đưa vào số lượng bộ test T.
Những dòng kế tiếp đưa vào các bộ test. Mỗi bộ test gồm hai dòng: dòng đầu tiên đưa vào độ dài xâu str; dòng tiếp theo đưa vào xâu... | ALGO | 0.999856 | 4.896672 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2021-06-03T02:29: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": "7fe97075656... |
9139f7f4-5ca7-4fc3-8a31-03fbaa36aa55 | mudit870/LeetCode | 1202-smallest-string-with-swaps/1202-smallest-string-with-swaps.cpp | // Algorithm:
// Make a graph using the pairs.
// Then find out all the connected components by dfs.
// For all components, store the positions and characters in an array during the dfs traversal.
// Sort the position array and characters array.
// Traverse through the position array and replace the character of each ... | ALGO | 0.999999 | 5.95732 | {
"github_metadata": {
"branch": "main",
"commit_count": 1215,
"repo_created_at": "2022-02-18T20:50: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": "dcc2b3cd0... |
0a2fc607-b937-45f0-a28a-1463c89d2114 | ks-kushagra/Leetcode | Populating Next Right Pointers in Each Node II.cpp | Given a binary tree
struct Node {
int val;
Node *left;
Node *right;
Node *next;
}
Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL.
Initially, all next pointers are set to NULL.
Input: root = [1,2,3,4,5,null,7]
Output: [1,#,2,... | ALGO | 0.999987 | 6.094859 | {
"github_metadata": {
"branch": "master",
"commit_count": 203,
"repo_created_at": "2020-07-02T07:51: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": "862b4a7e... |
5140a6d0-d977-4f77-b2e8-5c160d99dc7e | mauriciopoppe/competitive-programming | UVa/200/232.skyline.cpp | #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cctype>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<string>
#include<bitset>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<stack>
#include<sstream>
#include<utility>
#include<numeric>
#include<functi... | ALGO | 0.999657 | 3.898111 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2018-02-05T05:31:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fb75980a6... |
3bd67dfe-1cc0-4b3f-8aa2-fd7bb08c3921 | ashenoi/DIP_MINI_PROJECT | src/flow-code/color_flow.cpp | // color_flow.cpp
// color-code motion field
// normalizes based on specified value, or on maximum motion present otherwise
// DS 2/9/08 fixed bug in MotionToColor concerning reallocation of colim (thanks Yunpeng!)
//static const char *usage = "\n usage: %s [-quiet] in.flo out.png [maxmotion]\n";
// GURU DAS > My ... | ALGO | 0.901115 | 4.85455 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2014-10-15T17:37: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": "ff9fac23c... |
20c0c455-bb28-4daa-b42e-62f9fc7d88dc | InsightSoftwareConsortium/ITK | Modules/ThirdParty/VNL/src/vxl/core/vnl/examples/time_fastops.cxx | // This is core/vnl/examples/time_fastops.cxx
#include <iostream>
#include <cmath>
#include <vector>
#include "vul/vul_timer.h"
double
vnl_fastops_dot(const double * a, const double * b, unsigned int n);
#ifdef OPTIMIZED
# undef OPTIMIZED
# define OPTIMIZED 1
#else
# define OPTIMIZED 0
#endif
#ifndef METHOD
# def... | ALGO | 0.999102 | 6.704713 | {
"github_metadata": {
"branch": "main",
"commit_count": 57165,
"repo_created_at": "2010-07-27T15:48:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1517,
"forks": 701,
"issues": 268,
"pull_requests": 49
},
"file_meta": {
"content_id": "9... |
4fc411fc-ecfd-47d8-b43f-abfdf5e9322f | shahidul-brur/OnlineJudge-Solution | UVa/11536 - Smallest Sub-Array.cpp | /*=================================*\
Md. <NAME>
CSE, BRUR
Rangpur, Bangladesh
mail: <EMAIL>
FB : fb.com/shahidul.brur
Blog: shahidul-brur.blogspot.com
\*=================================*/
#include<bits/stdc++.... | ALGO | 0.999974 | 3.563212 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2019-06-15T04:11: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": "da9eb6b76... |
51dac4bf-850b-4186-94bf-bfa4aa111ec6 | ishandutta2007/codeforces-t | theoneyouwant/normal/380/C.cpp | //By TheOneYouWant
#pragma GCC optimize ("-O2")
#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define memreset(a) memset(a,0,sizeof(a))
#define testcase(t) int t;cin>>t;whi... | ALGO | 0.999659 | 4.124465 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "47bcf9ae78bc... |
fc9515fb-e0be-42d7-8c92-e63e361d1ad4 | Jaspreet-10/LeetCode | 0329-longest-increasing-path-in-a-matrix/0329-longest-increasing-path-in-a-matrix.cpp | class Solution {
public:
int findUniquePaths(int cr, int cc, int row, int col, vector<vector<int>>& dp, int prev, vector<vector<int>>& matrix) {
// Check for out-of-bounds or non-increasing conditions
if (cr < 0 || cc < 0 || cr >= row || cc >= col || matrix[cr][cc] <= prev) return 0;
// If already comp... | ALGO | 0.99997 | 6.745272 | {
"github_metadata": {
"branch": "main",
"commit_count": 3532,
"repo_created_at": "2022-01-04T06:16: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": "2a8e80394... |
48f4ecf5-3283-46fd-8b20-268b46ba43a3 | ryko9/cseUnderGrad | cse/CSE30/Lab_03/sortArray1.cpp | #include <iostream>
using namespace std;
int main()
{
int size; //size of array
cout << "Enter the size of the array: ";
cin >> size;
if(size > 0) //if input is valid
{
int arr[size]; //initializing array
cout << "Enter the numbers in the array, seperated by a space, and press enter: ";
for (int i = 0; i... | ALGO | 0.999734 | 4.256541 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2025-05-09T12:01:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f2d53ea5b8b... |
4b91a221-25db-4f3a-83f9-362cdfb199cb | ishandutta2007/codeforces-s | s2speed/normal/1537/E2.cpp | #include<bits/stdc++.h>
using namespace std;
#pragma GCC optimize ("Ofast")
#define all(x) x.begin() , x.end()
#define sze(x) (ll)(x.size())
#define mp(x , y) make_pair(x , y)
#define wall cerr<<"--------------------------------------"<<endl
typedef long long int ll;
typedef pair<ll , ll> pll;
typedef pair<int , int... | ALGO | 0.999998 | 4.102054 | {
"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": "aa11edfd32bb... |
e2ebdf2e-7bb6-4ebe-a141-b079e573f7d5 | Luca-Octavian/OOP-laborator | lab8/Source.cpp | #include <iostream>
#include <map>
#include <string>
#include <queue>
#include <fstream>
using namespace std;
void decasing(string& s1)
{
for (int i = 0;i < s1.length();i++)
{
if (s1[i] >= 'A' && s1[i] < 'a')
{
s1[i] = s1[i] + 'a' - 'A';
}
}
}
map <string, int> harta;
class Mcompare
{
public:
bool operator... | ALGO | 0.999712 | 3.594247 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2025-02-25T16:21: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": "8637b8e5ee4... |
4c8dabec-e7be-4f53-8d64-3585c872cd0f | eRRe-i/codeforces | 800/1526A.cpp | #include "bits/stdc++.h"
// 1526A - Mean Inequality
// RATING - 800
using namespace std;
#define forn(i, n) for (int i = 0; i < n; i++)
using ll = long long;
using f64 = double;
using ii = pair<int, int>;
using ull = unsigned long long;
using vi = vector<int>;
using vd = vector<double>;
using vii = vector<ii>;
usin... | ALGO | 0.999662 | 3.392785 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-12-02T16:39: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": "27cdb423c38... |
1a82daec-a380-4190-ae24-6c66c4b1963c | lacrymose/hpc-assignment | Code/hpc/Main/explicit-upwind.cpp | /*
#include <mpi.h>
#include <cmath>
#include <vector>
#include <iostream>
double analyticalSolution(double a, double x, double t);
unsigned int getFragmentation(int coreId, int coresQuantity, unsigned int jobSize);
double getLowerBound(int coreId, int coresQuantity);
void sendUpperBound(int coreId, int coresQuantity... | ALGO | 0.999997 | 4.360562 | {
"github_metadata": {
"branch": "master",
"commit_count": 69,
"repo_created_at": "2020-11-25T14:01: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": "ba8413c11... |
f186687d-56f9-47b4-97ae-9d176c5a5b01 | ucsb-cs24-mirza-s21/q4-incorrect-solutions | ex20.cpp | #include <iostream>
#include <queue>
#include <list>
#include <stack>
using namespace std;
class smartQueue{
queue<int> reg;
// Pushes a value into the heap, then ensures
// the heap is correctly arranged
void push(int value){
reg.push(value);
vdata.push_back(value);
// Percolate up from the last index to restore ... | ALGO | 0.999361 | 4.32298 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2021-06-13T01:11:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "653ca819a0fb... |
28f6526d-391a-4934-ac0f-f68894b596ef | CreativeFitz/TripleGame | TripleX.cpp | #include <iostream>
// This function prints the welcome message
void IntroductionMessage(){
std::cout << "\n\nYou have discovered a bomb in the middle of a bank\n\n";
std::cout << "If you wish to save everyone you are going to have to enter the correct disarm code\n\n";
}
bool PlayGame()
{
//Print welcome mes... | TOOL | 0.974443 | 3.301756 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2020-12-15T04:53: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": "40092e248ca9... |
8af99be8-635d-485b-a133-ba6b239c9fec | Himanshu12211967/GeeksForGeeks | Difficulty: Medium/Snake and Ladder Problem/snake-and-ladder-problem.cpp | // User function Template for C++
class Solution {
public:
int minThrow(int N, int arr[]) {
// code here
int start = 1;
int end = 30;
unordered_map<int,int> snake_ladder;
int i = 0;
while(i < 2*N){
int a = arr[i++];
... | ALGO | 0.999762 | 4.123653 | {
"github_metadata": {
"branch": "main",
"commit_count": 185,
"repo_created_at": "2025-04-10T07:24: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": "b50dfc9611... |
faf0f5b0-e0d0-4e48-9fdf-d2123aad1f2b | hayeon9792/CProgramming | 백준문제/BJ_연구소/BJ_연구소/main.cpp | #include <stdio.h>
typedef struct _info {
int x, y;
}info;
int res, N, M, map[8][8], tmp[8][8];
int di[4] = { -1,1,0,0 };
int dj[4] = { 0,0,-1,1 };
void mapcopy()
{
for (int i = 0; i < N; i++)
for (int j = 0; j < M; j++)
tmp[i][j] = map[i][j];
}
void maprecover()
{
for (int i = 0; i < N; i++)
for (int j =... | ALGO | 0.999904 | 4.124793 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2018-04-01T03:25: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": "81f11abf7... |
271ff201-fb63-4547-8543-3466263e9a97 | molivas2022/tarea1-Algoritmos-MinDistance | src/bruteforce.cpp | #include "../inc/algorithms.h"
#include <iostream>
#include <cmath>
double brute_force(std::vector<Point> points) {
double min_dist = __DBL_MAX__;
for (int i = 0; i < (int) points.size(); i++) {
for (int j = 0; j < (int) points.size(); j++) {
if (i == j) continue;
... | ALGO | 0.999465 | 5.385009 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2025-04-18T03:27: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": "04dd52672cb... |
b585b0b0-9fa3-4ca3-9146-14658302b260 | Thiagoow/Fatec-ZS-Cpp-Projects | Ativ07/MaiorMenorDos5.cpp | #include <iostream>
using namespace std;
int main() {
const int arraySize = 5;
double abc[arraySize], minimum, maximum;
string repeat;
Repetir:
system("cls");
cout << "--Digite " << arraySize << " valores--\n";
for (int i = 0; i < arraySize; i++) {
cout << "Digite o valor: ";
cin >> abc... | ALGO | 0.999538 | 3.766369 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2022-02-24T19:26: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": "4722b5a39... |
fcab47db-b50c-4da2-bb94-d7ba817e5bd0 | henhans/CTQMC | ctqmc.cc | #include <iostream>
#include <fstream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <cmath>
#include <ctime>
#include "config.h"
#include "local.h"
#include "det.h"
#include "random.h"
#include "common.h"
#include <omp.h>
//#include "mpi.h"
#include <cstdlib>
#includ... | ALGO | 0.985633 | 3.841712 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2016-01-04T20:21:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "827bb9afe... |
e3b658e5-dd72-4f22-8f07-f86a4adf215a | Rito-492/Luogu | P1164.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 1;
const int M = 1e4 + 1;
int n, m, a[N], dp[N][M];
int main () {
cin >> n >> m;
for (int i = 1; i <= n; i++)
cin >> a[i];
dp[0][0] = 1;
for (int i = 1; i <= n; i++) {
dp[i][0] = 1;
for (int j = m; j >= a[i]; j--)
... | ALGO | 0.999993 | 3.434214 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-10-31T07:06: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": "4e867cf970b... |
c61556c8-9ae7-458b-a944-bace66ab23ea | nahomderese/Competitive-Programing | Open Kattis/c++/Basic_Programming_1.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s,m,T;
int inputs[2], j;
getline(cin, s);
stringstream X(s);
j = 0;
while (getline(X, T, ' ')){
inputs[j] = stoi(T);
j++;
}
vector<int>Arr;
getline(cin, m);
stringstream Y(m);
while (getline(Y... | ALGO | 0.999804 | 3.023249 | {
"github_metadata": {
"branch": "master",
"commit_count": 588,
"repo_created_at": "2022-02-03T07:10:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "490588a6... |
b77df4ef-2748-4ac1-92f1-da1919e75be5 | apparecidoo/master-computational-algorithms | ComputationalAlgorithms/greatest_common_divisor.cpp | #include "pch.h"
#include "greatest_common_divisor.h"
GreatestCommonDivisor::GreatestCommonDivisor(double first, double second)
{
if (first > second) {
_major = first;
_minor = second;
}
else {
_major = second;
_minor = first;
}
}
GreatestCommonDivisor::~GreatestCommonDivisor()
{
}
double GreatestCommonD... | ALGO | 0.999026 | 5.828033 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2020-03-26T20:56: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": "496a2b367... |
7efdf08a-aeac-45e7-979f-05444aa24fbd | rithikrajkumar4/Competitive_Programming | 702_d.cpp | // RRRRRRRRRRRRkkkkk
#include<bits/stdc++.h>
using namespace std;
#define pi M_PI
#define eb(x) emplace_back(x)
#define mem(a,b) memset(a,b,sizeof(a))
#define ll long long
#define pb(a) push_back(a)
#define mk(a,b) make_pair(a,b)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbeg... | ALGO | 0.999955 | 3.787789 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-08-27T15:05: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": "9858e0796... |
9525ab55-aeef-46b5-a2e3-9c4177157ed3 | Rajat775/Rajat-Singh | datamining/hashbased.cpp | #include<bits/stdc++.h>
using namespace std;
int nowStep=1;
int minsupport;
vector<vector<int> > transaction;
int mincount=2;
vector<vector<int>>L,C;
unordered_map<int,vector< pair<int,int> > >hashmap;
vector<vector<vector<int> > > frequentset;
vector<vector<int> > joining ()
{
vector<vector<int> > ret;
... | ALGO | 0.999761 | 3.850821 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-08-29T14:02: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": "f0e432f6e0... |
7b70c742-b117-48fd-a9ed-61f234b333c4 | AlekseyKravchuk/cpp | belts_cpp/03_red_belt/06_week/00_experiments/27_mutex.cpp | #include <chrono>
#include <iostream>
#include <mutex> // std::mutex, std::lock_guard
#include <thread>
#include "../../log_duration.h"
// мьютек нам нужен, чтобы синхронизировать потоки и защитить разделяемые данные (участок кода), чтобы некоторая последовательность действий
// выполнялась строго в однопоточном режи... | TOOL | 0.916331 | 5.130676 | {
"github_metadata": {
"branch": "main",
"commit_count": 505,
"repo_created_at": "2022-08-10T11:17: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": "a4bda984d0... |
27d66c71-e4ea-4df8-aa20-76f165554691 | conao3/coder | contests/atcoder/abc154/abc154_a/main.cpp | #include <iostream>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep3(i, m, n) for (int i = (m); i < (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define rrep3(i, m, n) for (int i = (int)(n)-1; i... | ALGO | 0.996238 | 4.565185 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-05-11T14:16: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": "fac083194b... |
0d8b5da4-d985-471c-b49f-98aac4b26759 | rkwhrcjsaud/kibum | 백준/Silver/10816. 숫자 카드 2/숫자 카드 2.cc | #include <iostream>
#include <algorithm>
int n, m;
int arrA[500003], arrB[500003];
int compare(int a, int b)
{
return a < b;
}
int upperBound(int left, int right, int k)
{
if (left > right)
return 0;
int mid = (right + left) / 2;
if (arrA[mid] > k)
return upperBound(left, mid - 1, k);
if (arrA[mid] < k)
r... | ALGO | 0.999978 | 4.069505 | {
"github_metadata": {
"branch": "master",
"commit_count": 796,
"repo_created_at": "2022-06-26T08:54: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": "0f79644b... |
e50a7007-d7bc-4931-9ddd-fd26bff2bc5c | uni20181283/UNIST | data structure/assignment4/AVLTree.h | #include "Tree.h"
template <class keyT, class valT>
class AVLTree_t : public Tree_t<keyT, valT> {
long check_bf(Node_t<keyT, valT>* n) {
// Checks balance factor values in tree.
long hr, hl, h;
hr = hl = 0;
if(!n) return 0;
hr = check_bf(n->right);
hl = check_bf(n->l... | ALGO | 0.988332 | 5.955379 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2021-12-23T09:30: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": "c7216f7c56e... |
63681ac5-8a86-41f0-b406-b000bb6d4fa3 | ShinewineW/LeetcodePractice | AcWing/AcWing_3773.cpp | //思路:
#include <iostream>
#include <algorithm>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <sstream>
#include <map>
#include <stack>
#include <string>
#include <vector>
#include <queue>
#include <list>
#include <stdlib.h>
#include <math.h>
#include <cstring>
#include <climits>
using names... | ALGO | 0.999932 | 4.052905 | {
"github_metadata": {
"branch": "main",
"commit_count": 192,
"repo_created_at": "2021-01-23T13:50:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ef17cee82... |
3740fb89-11ae-4099-9377-e9ceda2ba717 | adarshkosta/Safe_Falling_CARIS_Lab_UBC | Arduino Codes/DCMotorPositionControl/DCMotorPositionControl.ino | //Roboclaw simple serial example. Set mode to 5. Option to 4(38400 bps)
#include <SoftwareSerial.h> //See limitations of Arduino SoftwareSerial
#include <avr/io.h>
#include <avr/interrupt.h>
#define enc0A 2
#define enc0B 4
#define enc1A 3
#define enc1B 5
#define S1 10
#define S2 11
#define POT_PIN A5
#define PID... | TOOL | 0.967765 | 5.765327 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2016-05-11T23:59: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": "9d40a31933... |
252f82d8-0dd9-4bc5-b1c4-afb839c361a9 | Roloman/Inversa | MCM_Algoritmos.cpp | // MCM_Algoritmos.cpp : Este archivo contiene la función "main". La ejecución del programa comienza y termina ahí.
//
#include "MCD.h"
#include <bitset>
#define M 1028
MCD::MCD()
{
}
MCD::~MCD()
{
//dtor
}
ZZ MCD::Valor_Absoluto(ZZ a)
{
if (a < 0)
return a * -1;
else
{
return a;
... | ALGO | 0.999787 | 4.080779 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-06-02T00:51: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": "f33226e530... |
e214476c-a01a-4222-bcfd-50ead2945f8a | Nanioi/coding_test_algorithm | 자료구조_c/큐/1/main.cpp | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#pragma warning (disable:4996)
typedef struct Queue {
int f, r, size;
int* A;
}queue;
int isEmpty(queue* q);
int isFull(queue* q);
void initQueue(queue* q, int n);
void enqueue(queue* q, int data);
void dequeue(queue* q);
void print_Q(queue* q);
void... | ALGO | 0.999409 | 3.887256 | {
"github_metadata": {
"branch": "main",
"commit_count": 301,
"repo_created_at": "2021-03-17T16:08: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": "cd02fcc75d... |
af878751-81f2-4813-b2fb-d5396841b075 | Amanzhol-1/ADS_KBTU | LAB 10/Dtsol.cpp | #include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
vector<int> g[5001];
int red[5001]; // массив из флагов чтобы определить этот элемент за белых или за красных
bool ok = false;
void addEdge(int a, int b){
g[a].push_back(b);
g[b].push_back(a);
}
void BFS(int v){ //... | ALGO | 0.99992 | 4.092758 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-10-02T11:45:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ade9087d0f1... |
b3659f20-a547-471a-a9ce-970f30b53957 | VictorLamarca/CP---Algorithms | excessive/Graph/max_dist_tree.cpp | #include <bits/stdc++.h>
using namespace std;
#define fr(i,n) for(int i = 0; i<n; i++)
#define sz(v) (int)(v.size())
#define prin(a) cout << #a << " = " << a << endl
#define prinv(v) cout << #v << " = "; for(auto it : v) cout << it << ", "; cout << endl
#define all(v) (v).begin(),(v).end()
typedef long long ll;
#def... | ALGO | 0.999988 | 4.638249 | {
"github_metadata": {
"branch": "master",
"commit_count": 197,
"repo_created_at": "2018-11-19T23:45:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb4daba... |
eb3d87c3-ad34-457e-aeb8-b65129597fe7 | G-CR/acm-solution | ACM/Prictise/AtCoder/AtCoder Beginner Contest 197/D - Opposite.cpp | #include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-8;
int sgn(double x) {
if(fabs(x) < eps) return 0;
if(x < 0) return -1;
else return 1;
}
struct Point { // 表示点
double x, y;
Point(){}
Point(double _x,double _y) {
x = _x; y = _y;
}
void input() {
scanf("%lf ... | ALGO | 0.999749 | 4.034559 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2019-12-07T14:01: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": "6d54e0dc... |
4c7cad66-775f-4387-8b07-13b45a5092a6 | ziglang/zig | lib/libcxx/include/__algorithm/lexicographical_compare.h | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | ALGO | 0.997124 | 7.077929 | {
"github_metadata": {
"branch": "master",
"commit_count": 34092,
"repo_created_at": "2015-08-06T00:51:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 40012,
"forks": 2915,
"issues": 3389,
"pull_requests": 267
},
"file_meta": {
"content_i... |
25523383-c836-405c-b7ba-ecd0cc86e97b | chasemalbright/CSCE221 | graphAlgorithms/src/weighted-graph.hpp | #pragma once
#include <unordered_map>
#include <unordered_set>
#include <stdexcept>
#include <utility>
// directed, weighted graph data structure, stores vertices of type T
template <typename T>
class WeightedGraph {
public:
// value represented by nodes in the graph
using value_type = T;
// edge weight t... | ALGO | 0.992603 | 7.098022 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2022-01-31T18:04:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc2a346e69e... |
2bd3e32f-ec1f-47a8-ab45-b37c3af293e7 | jacksky64/imageProcessing | QC/QC_full_sparse.cxx | #include "mex.h"
#ifndef MATLAB_MEX_FILE
#define MATLAB_MEX_FILE
#endif
#include "sparse_matlab_like_matrix.hpp"
#include "OP_mex_utils.hxx"
#include "QC_full_sparse.hpp"
void mexFunction(int nout, mxArray *out[],
int nin, const mxArray *in[]) {
const double* P= static_cast<const double*>( mxGe... | ALGO | 0.996333 | 4.188006 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2016-10-01T21:30:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1cf1732... |
c3aaf73f-cbc5-4a10-93f4-991b8e461697 | AlmSmartDoctor/study-2023-03-algorithm-problem-solving | day08 bfs/assignment/13460 서민혁.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ios_base ::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int N, M;
cin >> N >> M;
queue<vector<int>> next;
vector<vector<char>> map(N, vector<char>(M));
vector<int> initial_state(5);
// state ... | ALGO | 0.99992 | 4.154384 | {
"github_metadata": {
"branch": "main",
"commit_count": 243,
"repo_created_at": "2023-03-13T01:22:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd0f3e2d0d1... |
c42e13c9-cac9-4897-bdc4-ea3c8a3606dc | Deepak-vm/Data-Structures-and-Algorithm | codes/l18.cpp | // insertion sort
#include <iostream>
using namespace std;
void insertionsort(int arr[] , int n ){
for(int i =0 ; i< n ; i++){
int temp = arr[i];
int j = i-1 ;
for ( ; j>= 0 ; j--){
if(arr[j]> temp){
arr[j+1] = arr[j];
}
else break;
... | ALGO | 0.999628 | 5.165213 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2024-02-22T19:12:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d72bd1dcba... |
c5b5b7bb-4dbc-4c2f-bc97-f75646d28038 | Vedanti0404/DSA | Arrays/smallest_largest.cpp | //find the smallest and largest element in array
#include <bits/stdc++.h>
using namespace std;
//smallest
int smallest(int arr[], int n) {
int smallest = INT_MAX;
for (int i = 0; i < n; i++) {
if (arr[i] < smallest) {
smallest = arr[i];
}
}
return smallest;
}
//second smalle... | ALGO | 0.999729 | 4.392973 | {
"github_metadata": {
"branch": "main",
"commit_count": 218,
"repo_created_at": "2023-12-30T03:59: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": "f432f1d809... |
8ee6147e-2d20-4a36-9c2b-7b678474cc7f | GameDevEducation/CPlusPlus_LoopsAndContainers | C++ Tutorial - Loops and Containers/C++ Tutorial - Loops and Containers.cpp | // C++ Tutorial - Loops and Containers.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
int main()
{
// count up from 1 to 10 and sum the numbers together
int sum = 0;
// for loop
// Loop initialisation (run once): int num... | TOOL | 0.992829 | 3.968642 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-05-21T23:52:52.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bc6d6f8fcab... |
8c53373f-dbbe-47f5-93bc-a82f1e54ee41 | Arpit-2678/Competitive-Programs | 1114_B_codeforces.cpp | // LINK=https://codeforces.com/contest/1114/problem/B
#include <bits/stdc++.h>
#ifdef LOCAL
#include "debug.hpp"
#else
#define debug(...) void(0);
#endif
using namespace std;
#define int long long
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
int n, m, k;
cin >> n >> m >> k;
... | ALGO | 0.999999 | 3.863172 | {
"github_metadata": {
"branch": "main",
"commit_count": 900,
"repo_created_at": "2021-03-24T14:19:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f9e3eff4b7... |
219841a3-0418-4b15-8aac-68185372ff58 | ahampriyanshu/algo-ds-101 | Algorithms/DP/Maximum_Achievable_Coins/maximum_achievable_coins.cpp |
#include <bits/stdc++.h>
using namespace std;
int optimalStrategyOfGame(
int* arr, int n)
{
int table[n][n];
for (int gap = 0; gap < n; ++gap) {
for (int i = 0, j = gap; j < n; ++i, ++j) {
int x = ((i + 2) <= j)
? table[i + 2][j]
: 0;
int y = ((i + 1) <= (j - 1))
? t... | ALGO | 0.99993 | 4.21974 | {
"github_metadata": {
"branch": "main",
"commit_count": 3367,
"repo_created_at": "2020-07-10T11:12:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 159,
"forks": 739,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6078a... |
9ca70556-e452-429b-bc77-ae3d060b8878 | delwar03/CF | C_Shichikuji_and_Power_Grid.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T> using o_set = tree<T, null_type, std::less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define int long long
#define endl '\n'
#define F first
#define S secon... | ALGO | 0.999949 | 4.282362 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2023-12-26T03:27: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": "1960a98848... |
752e6d9c-2560-4420-9ac4-69887feb5b94 | leetcode-pp/leetcode-pp | code/ch02/2.8.1.fractionToDecimal.cpp | #include <cstdlib>
#include <cmath>
#include <string>
#include <map>
using namespace std;
typedef long long ll;
class Solution {
public:
string fractionToDecimal(ll numerator,
ll denominator) {
string res("");
if (double(numerator) / double(denominator) < 0.0) res += "-";
numerator = llabs(numerat... | ALGO | 0.999784 | 5.277319 | {
"github_metadata": {
"branch": "master",
"commit_count": 321,
"repo_created_at": "2021-02-23T10:50:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 25,
"forks": 6,
"issues": 9,
"pull_requests": 0
},
"file_meta": {
"content_id": "46a72c96... |
96f2b850-4cc9-42b3-bd7a-575e49242283 | utkarshnath/Lauchpad-June | Lecture-26/heap.cpp | #include<iostream>
#include<vector>
using namespace std;
class Heap{
vector<int>v;
void heapify(int index){
int left = 2*index;
int right = 2*index+1;
int minIndex = index;
if(left < v.size() && v[index]>v[left]){
minIndex = left;
}
if(right < v.size(... | ALGO | 0.999858 | 4.24143 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2019-06-08T11:51:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "810bb06e9... |
db7b4e80-12f3-4bca-b19a-c272eac499f3 | immortalCO/WTL | sais.cpp | #include <bits/stdc++.h>
#define RG register
#define For(i, l, r) for(RG int i = l, ___e = r; i <= ___e; ++i)
#define Rep(i, l, r) for(RG int i = l, ___e = r; i < ___e; ++i)
namespace io
{
#define RG register
const int MaxBuff = 1 << 15;
const int MaxOut = 1 << 24;
char b[MaxBuff], *S = b, *T = b;
#define getc() ... | ALGO | 0.999985 | 3.298638 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2018-09-01T09:09: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": "1845295de... |
f87f79b3-e057-436c-9f0f-5d8f20093900 | acfr/snark | geodesy/detail/GeographicConversions/ECEF.h | // This file is part of snark, a generic and flexible library for robotics research
// Copyright (c) 2011 The University of Sydney
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistr... | ALGO | 0.909221 | 5.044044 | {
"github_metadata": {
"branch": "master",
"commit_count": 4979,
"repo_created_at": "2012-10-05T04:59:05.000Z",
"is_fork": true,
"is_org_owned": true,
"forked_from": "vlaskine/snark",
"stars": 71,
"forks": 41,
"issues": 42,
"pull_requests": 2
},
"file_meta": {
"content_... |
53f231f3-797f-4567-b282-76598fbda0df | yunussid/coding-ninjas-c-DATA-Structure-all-questions-solved | Graph/Gr P12.cpp | /*
Largest Piece
It's Gary's birthday today and he has ordered his favourite square cake consisting of '0's and '1's . But Gary wants the biggest piece of '1's and
no '0's . A piece of cake is defined as a part which consist of only '1's, and all '1's share an edge with each other on the cake. Given the size
of cake N... | ALGO | 0.999982 | 5.261223 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2021-05-22T21:00:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "88fc0f59775... |
02d17e74-477c-4658-bdfa-5553b83dd915 | BaiXilin/myleetcode | 07-tree/124-bin-tree-max-path-sum/max_path_sum.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.999972 | 6.119499 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2023-09-05T01:31: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": "6a84032ac... |
5d0918dd-22a4-4de4-a5eb-8b95d241fafe | Sabrina-Akter/All-My-Codes | SPOJ/Aggressive_cows.cpp | #include <bits/stdc++.h>
using namespace std;
#define fastt ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long int
#define vll vector <ll>
#define pb push_back
#define ff first
#define ss second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define ms(x) memset(x, ... | ALGO | 0.999997 | 3.78104 | {
"github_metadata": {
"branch": "main",
"commit_count": 786,
"repo_created_at": "2023-06-28T07:43: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": "bd7610fa6d... |
cc43a5db-a423-4be2-8e6d-9c472c50fc38 | pibuxd/competitive-programming | Satori/kl2/anty-portal.cpp | // author: Piotr "pibuxd" Bublik (https://github.com/pibuxd)
#include "bits/stdc++.h"
using namespace std;
int V, E;
void readG(vector<vector<int>> &G){
for(int i = 0, a, b; i < E; i++){
cin >> a >> b;
G[a].push_back(b);
G[b].push_back(a);
}
}
void colorG(vector<vector<int>> &G){
vector<bool> visit... | ALGO | 0.99996 | 4.993527 | {
"github_metadata": {
"branch": "master",
"commit_count": 409,
"repo_created_at": "2021-01-06T21:36:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "74ef1e48... |
7d198b38-b66f-4f95-9d09-b5c3f956e2c3 | gagolews/stringi | src/stri_search_coll_locate.cpp | /* This file is part of the 'stringi' project.
* Copyright (c) 2013-2025, <NAME> <https://www.gagolewski.com/>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of sour... | TOOL | 0.993931 | 6.887848 | {
"github_metadata": {
"branch": "master",
"commit_count": 1691,
"repo_created_at": "2013-01-05T15:54:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 311,
"forks": 49,
"issues": 46,
"pull_requests": 0
},
"file_meta": {
"content_id": "bcd... |
fed1905e-4f72-4d90-95cb-e405e2c930cb | Wildexad/w-u-crying- | practice 3/задание 2/rational.cpp | #include "rational.h"
#include <iostream>
int rational::NOD(int a, int b)
{
if (b == 0) return a;
return NOD(b, a % b);
}
rational::rational() {
a = 0; b = 1;
}
rational::rational(int a1, int b1) {
a = a1; b = b1;
if (b == 0) {
std::cout << "Знаменатель не может быть равен нулю." << std::endl;
a = 0; b = 1;... | TOOL | 0.96613 | 4.729922 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2023-02-12T22:20:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bdc84a4a308... |
21bb747d-c1f4-4345-9cff-106e086f04a6 | acmeism/RosettaCodeData | Task/Caesar-cipher/C++/caesar-cipher-2.cpp | /* caesar cipher */
#include <string>
#include <iostream>
#include <cctype>
int main( ) {
using namespace std;
string input ;
int key = 0;
// lambda functions
auto encrypt = [&](char c, int key ) {
char A = ( islower(c) )? 'a': 'A';
c = (isalpha(c))? (c - A + key) % 26 + A : c;
return (char... | ALGO | 0.990953 | 5.079582 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2013-04-08T20:08:30.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 518,
"forks": 177,
"issues": 12,
"pull_requests": 3
},
"file_meta": {
"content_id": "6a26af1... |
48adc3d6-e5bb-4827-b1ec-45fb43087783 | IshaanArora18/Algorithms | shortestPathBinaryMaze.cpp | //{ Driver Code Starts
// Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function Template for C++
class Solution {
public:
int shortestPath(vector<vector<int>> &grid, pair<int, int> source,
pair<int, int> destination) {
// cod... | ALGO | 0.999967 | 5.844524 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-01-07T11:44: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": "20f6cae8612c... |
8306f800-233f-46eb-82d5-cc07ea3c9af9 | RasedulRussell/uva_problem_solve | 11450_Wedding_Shopping.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define MAX 1000005
#define INF 100000000
#define __FastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
///11450_Wedding_Shopping.cpp
vector<int>market[23];
int dp[23][205];
int N, totalMoney;
int fun(int pos, int money){
if(pos... | ALGO | 0.999961 | 3.837515 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2018-12-07T03:38:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "6df78fe90... |
4ef3cec4-16b8-4468-9a3a-7c5da820f83b | ishandutta2007/codeforces-c | cerberus97/normal/1598/B.cpp | /* cerberus97 - <NAME> */
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <numeric>
using namespace std;
#define pb push_b... | ALGO | 0.999409 | 4.909119 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:17:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4348e4d43acf... |
63a711d8-d703-45a6-9224-1c57bdd46120 | fryzito/ACM-problems-solved | Bolivia/BoliviaD.cpp | #include <bits/stdc++.h>
#define ll long long
#define VI vector<int>
#define REPN(i,x,y) for(int i=x;i<y;i++)
#define REP(i,y) REPN(i,0,y)
#define REPR(i,y,x) for(int i=y;i>=x;i--)
#define CLR(A,x) memset(A,x,sizeof(A))
#define INF (1<<30)
#define eps (1e-9)
#define ALL(v) (v).begin(),(v).end()
#define RALL(v) (v).rbeg... | ALGO | 0.999683 | 3.548259 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2015-01-08T18:11:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9581f14aeb5... |
c46ceb7a-4185-4e8a-84ed-57ba07fb6bc7 | AnthonyKon/RomanNumeralConverter | roman.cpp | /**
*
* Practical 2: Roman Numbers - Convert interger to roman numeral equivalent in the command line. Convert roman numeral to intger.
*/
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
string roman[]{ "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX" };
... | ALGO | 0.997221 | 4.139445 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-11-22T23:53: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": "215d16f9aa... |
c38024a9-230a-47f8-bf09-9c8f476da777 | jaxvanyang/acm | jax/training/21-03/21-03-28-afternoon/e.cc | #include <iostream>
#include <vector>
#include <set>
using namespace std;
using ll = long long;
ll gcd(ll a, ll b) {
return b == 0 ? a : gcd(b, a % b);
}
int main() {
int n;
scanf("%d", &n);
set<int> st1;
set<vector<ll>> st2;
while (n--) {
int x1, y1, x2, y2;
scanf("%d%d%d%d", ... | ALGO | 0.99864 | 4.172418 | {
"github_metadata": {
"branch": "master",
"commit_count": 384,
"repo_created_at": "2021-11-02T02:32:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "41e4e757... |
62a1de61-ef01-4717-b0e6-468189938a2b | Minh2k3/AI_TLU | HillClimbing.cpp | // AI : Hill Climbing
// Y tuong : Tuong tu Best First Search va Beam
// Nhung voi moi dinh dang duyet thi chen vao danh sach L
// Sap xep lai L theo h(u) roi chen vao dau Open
#include <bits/stdc++.h>
using namespace std;
const int maxn = 101;
ifstream inp("AI_Search_4.INP");
int n, be, en, ans[maxn] = {0};
... | ALGO | 0.999963 | 3.800014 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-12-23T16:23: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": "9a8db86e5c2a... |
146ba1ce-c3da-46d6-9a02-e14a9b7bfe63 | shawntan/opencog | opencog/learning/moses/moses/moses_main.h | /** moses_main.h ---
*
* Copyright (C) 2010 OpenCog Foundation
*
* Author: <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License v3 as
* published by the Free Software Foundation and including the exceptions
* at ... | ALGO | 0.992925 | 4.821424 | {
"github_metadata": {
"branch": "master",
"commit_count": 8086,
"repo_created_at": "2012-10-10T00:10:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "267656c... |
0d807ba6-1c87-4427-af2d-4cb6d08a7fc5 | Tora416/MultiCodeEmbed | dataset/dataset_raw/gcj_cpp/teddytao18/8294486_5654117850546176_teddytao18.cpp | #include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
using namespace std;
char s[1010];
char type[] = "ROYGBV";
int a[10];
int mp[1010];
void init() { memset(s, 0, sizeof(s)); }
int main() {
int T;
scanf(... | ALGO | 0.99989 | 3.620823 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2025-07-10T08:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a61fb7d62... |
67e44c64-3b05-40aa-b21a-886c8c84a93b | TianYiJT/GraphicsDemo | SSAO/OpenGL_Demo1/Main1.cpp | /*
#include<iostream>
#include"stdio.h"
#include"LoadShaders.h"
#include"vmath.h"
#define BUFFER_OFFSET(offset) ((GLvoid*) (NULL + offset))
#define ALL_FACE 12
#define FRONT_FIR 0
#define FRONT_SEC 3
#define BACK_FIR 6
#define BACK_SEC 9
#define RIGHT_FIR 12
#define RIGHT_SEC 15
#define LEFT_FIR 18
#define LEFT_SEC 21
... | TOOL | 0.979522 | 3.854292 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-04-28T09:12: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": "54f34c82ea... |
304571df-b6e8-41a3-9690-045aed953132 | PauRF03/FOPR-EPSEVG | LAB15 - Structs/P56358/program.cc | #include <iostream>
using namespace std;
struct Time {
int hour, minute, second;
};
void one_second(const Time& t, Time& t1, Time& t2){
t1 = t;
t2 = t;
t1.second++;
t2.second--;
if(t1.second >= 60){
t1.second = 0;
t1.minute++;
if(t1.minute >= 60){
t1.minute... | ALGO | 0.997842 | 3.820611 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2023-04-20T19: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": "78f641866e9... |
793b3975-f863-47a3-b8c3-6b832df9f87c | changchen331/LeetCode | 2444.cpp | #include <vector>
#include <iostream>
using namespace std;
class Solution
{
public:
long long countSubarrays(vector<int> &nums, int minK, int maxK)
{
long long answer = 0;
int size = nums.size();
int min_i = -1, max_i = -1, exclude = -1;
for (int i = 0; i < size; i++)
{... | ALGO | 0.999887 | 5.861331 | {
"github_metadata": {
"branch": "main",
"commit_count": 100,
"repo_created_at": "2025-03-25T16:05: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": "32c2313c08... |
49c6b125-24bf-4375-a5ec-111a6fa1b459 | Ragtime-LAB/Ragtime_Panthera | 3_ROS_workspace/ROS1-Noetic+Ubuntu20.04/panther_ws/src/dm_drive/include/eigen/bench/benchmarkX.cpp | // g++ -fopenmp -I .. -O3 -DNDEBUG -finline-limit=1000 benchmarkX.cpp -o b && time ./b
#include <iostream>
#include <Eigen/Core>
using namespace std;
using namespace Eigen;
#ifndef MATTYPE
#define MATTYPE MatrixXLd
#endif
#ifndef MATSIZE
#define MATSIZE 400
#endif
#ifndef REPEAT
#define REPEAT 100
#endif
int mai... | ALGO | 0.964621 | 3.901513 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2025-05-02T09:22:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 53,
"forks": 4,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "88eafdffc... |
cbe6c4be-000a-48b4-b2d3-87d9575a9838 | fripSide/UVaEveryday | uva/06/0606/UVa1586.cc | #include <cstdio>
#include <map>
using namespace std;
int main() {
map<char, float> tb; tb['C'] = 12.01, tb['H'] = 1.008;
tb['O'] = 16.00, tb['N'] = 14.01;
int n;
const int maxn = 100;
char s[maxn];
scanf("%d", &n);
while (n--) {
int b = 0;
float ans = 0.f, t = 0.f;
... | ALGO | 0.993638 | 3.415866 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2016-06-05T15:30: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": "d018a21c5... |
1ea70d7d-00c6-4fd2-b2d9-9850644ae6f5 | mohammad-majoony/codeForces-submits | C. Dominant Piranha/main.cpp | #include<bits/stdc++.h>
#define enl '\n'
using namespace std ;
int solve(){
int len ; cin >> len ;
int arr[len] , maxi = 0 ;
for(int index = 0 ; index < len ; index++){
cin >> arr[index] ;
maxi = max(maxi , arr[index]) ;
}
for(int index = 1 ; index < len ; index++){
if(arr[... | ALGO | 0.999615 | 4.188691 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2023-04-27T10:13:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d70811b6b... |
f005f89a-27d9-47d8-9473-ba126131cd7b | irenaeus1/algo_study | 2502/250226/boj_2606.cpp | //2606번 바이러스
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int N, M;
cin >> N >> M;
vector<vector<int>> graph(N + 1);
vector<bool> visited(N + 1, false);
for(int i = 0; i < ... | ALGO | 0.999927 | 3.950383 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2025-01-28T12:49: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": "3b57d6d5874... |
538beb61-2901-4b31-afa0-be0e5542de09 | dpjudas/SurrealEngine | SurrealEngine/Math/quaternion.h | #pragma once
#include "vec.h"
#include "mat.h"
#include <cfloat>
enum class EulerOrder
{
xyz,
xzy,
yzx,
yxz,
zxy,
zyx
};
template<typename T>
struct quaternionT
{
quaternionT() : x((T)0), y((T)0), z((T)0), w((T)1) { }
quaternionT(T x, T y, T z, T w) : x(x), y(y), z(z), w(w) { }
quaternionT(const vec4T<T> &v... | ALGO | 0.992547 | 7.38908 | {
"github_metadata": {
"branch": "master",
"commit_count": 1119,
"repo_created_at": "2020-12-02T16:58:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 953,
"forks": 29,
"issues": 14,
"pull_requests": 0
},
"file_meta": {
"content_id": "7c2... |
2d040133-892c-4c1d-b2ee-2ef543776f91 | GrittyCode/Programmers | Programmers/Programmers/Level1_Kakao_Solution.cpp | #include <string>
#include <vector>
#include <unordered_map>
using namespace std;
int solution(string s)
{
unordered_map<string, int> DataBase;
DataBase.insert({ "zero",0 });
DataBase.insert({ "one",1 });
DataBase.insert({ "two",2 });
DataBase.insert({ "three",3 });
DataBase.insert({ "four",... | ALGO | 0.999831 | 4.819816 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2022-12-26T14:40:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9a125291dfc... |
2b1903ab-08ac-4287-a705-4f61296df0c7 | DmitryGalich/ring_buffer_task | main.cpp | #include <atomic>
#include <vector>
#include <iostream>
#include <thread>
#include <chrono>
template <typename T>
class RingBuffer
{
struct alignas(64) PaddedAtomic
{
std::atomic<size_t> value_{0};
size_t capacity_{0};
private:
char padding_[64 - sizeof(size_t) - sizeof(std::atomi... | TOOL | 0.983846 | 6.565971 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2024-10-16T15:35: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": "d02f3bf87f9... |
5a15dfc8-a216-46e2-a39e-70b41fcd794d | J-S-Glenn/School | CISP360/Homework/HW6/EhRay.cpp | // EhRay.cpp -- Assignment 5
// 4/21/2024
// <NAME>
#include <stack>
#include <ctime>
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
// Global Variables
const int ARRAY_SIZE = 10;
const double COMP_TOLERANCE = .05;
const string F_START = "Started";
const string F_END = "Ended";
const st... | TOOL | 0.934752 | 4.523181 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2024-01-14T05:39: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": "9c65e8f1a6b... |
7f0e1405-a192-408f-a05d-dc5244c8d16b | liuyubobobo/Play-Leetcode | 1001-1500/1001-Grid-Illumination/cpp-1001/main.cpp | /// Source : https://leetcode.com/problems/grid-illumination/
/// Author : liuyubobobo
/// Time : 2019-02-23
#include <iostream>
#include <vector>
#include <unordered_map>
#include <set>
using namespace std;
/// Using HashSet
/// Time Complexity: O(n + q)
/// Space Complexity : O(n)
class Solution {
public:
v... | ALGO | 0.999953 | 5.975552 | {
"github_metadata": {
"branch": "master",
"commit_count": 2592,
"repo_created_at": "2016-12-01T17:08:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2732,
"forks": 718,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "82... |
e6a81e1e-ba9e-44d9-9673-c07baf619f68 | sajid-ayman/Codeforces-problems-solution | C. King's Path.cpp | // author : <NAME>
// problem : https://codeforces.com/contest/242/problem/C
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fi first
#define se second
#define tc ll tc;cin>>tc;while(tc--)
#define to ll to=1;while(to--)
#defi... | ALGO | 0.999789 | 3.796076 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2024-06-22T14:37:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "40e75cb541f... |
ae70e172-7437-436b-89e0-3cae513b9c77 | 308912190/gitcode | cpp/leetcode/8.二分查找.cpp | class Solution {
public:
int search(vector<int>& nums, int target) {
int left = 0;
int right = nums.size() - 1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (target > nums[mid]) {
left = mid + 1;
}
else if (ta... | ALGO | 0.999966 | 5.845041 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2024-10-29T05:14: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": "8effef7fc... |
f7901c0e-ee4e-49dc-ac31-cb424ae7d6a8 | lifeng10/DSE | BF_IBE.cpp | #include "BF_IBE.h" // ✅ 包含头文件
using namespace std;
// ✅ 构造函数定义
BF_IBE::BF_IBE(Pairing& pairing) : e(pairing) {}
// ✅ setup 实现
void BF_IBE::setup(PublicKey& pk, SecretKey& sk) {
sk.s = Zr(e, true);
pk.P = G2(e, false);
pk.P2 = pk.P ^ sk.s;
}
// ✅ extract 实现
BF_IBE::PrivateKey BF_IBE::extract(co... | ALGO | 0.991703 | 5.577499 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2025-07-13T09:02: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": "c26ae7a452... |
cdac288d-e7f6-43e0-8bf6-241a5a0cb738 | jeroenrook/MOSMAC-ECJ | experiments/aclib/aclib2/target_algorithms/sat/cadical-sc17/cadical-sc17-proof/build/cadical/src/parse.hpp | #ifndef _parse_hpp_INCLUDED
#define _parse_hpp_INCLUDED
namespace CaDiCaL {
// Factors out common functions for parsing of DIMACS and solution files.
class File;
class External;
class Internal;
class Parser {
typedef signed char signed_char;
Internal * internal;
External * external;
File * file;
void p... | TOOL | 0.989073 | 6.366302 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-03-03T13:45:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1001c71781b2... |
65259a5b-fc25-4506-b542-f07581e36cf9 | azzyjk/ReAlgorithm | Class3/1074.cpp | #include<iostream>
#include<cmath>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int N, r, c, minRow = 0, maxRow, minCol = 0, maxCol, res = 0, all = 0, line, baseRow = 0, baseCol = 0;
cin >> N >> r >> c;
while (true){
line = pow... | ALGO | 0.999563 | 3.263661 | {
"github_metadata": {
"branch": "main",
"commit_count": 94,
"repo_created_at": "2021-10-18T17:43:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3a5b2fdab9... |
5040614a-c51b-404c-8a82-702554f3956b | sauravchandra1/Leetcode | problems/video_stitching/solution.cpp | class Solution {
public:
int videoStitching(vector<vector<int>>& clips, int T) {
int len = clips.size();
if (len == 1) {
if (clips[0][0] == 0 && clips[0][1] >= T) return 1;
else return -1;
}
sort(clips.begin(), clips.end(), [](const vector<int> &a, const vecto... | ALGO | 0.999963 | 5.753436 | {
"github_metadata": {
"branch": "main",
"commit_count": 636,
"repo_created_at": "2021-11-10T02:56: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": "579c9a7951... |
4a7548c6-8c2e-4a22-8f72-ec5aeaa9a6b7 | arrebole/Leisure | src/OJ/2295【C语言】【一维数组】数字移位/main.cc | #include <stdio.h>
void intpudata(int a[], int n);
void moving(int a[], int n, int k); //k表示向后移动k位
void outputdata(int a[], int n);
int main()
{
int b[50];
//@@1
int n, m;
scanf("%d %d", &n, &m);
intpudata(b, n);
moving(b, n, m);
outputdata(b, n);
//@@1
return 0;
}
//@@2
void intpu... | ALGO | 0.999919 | 3.228942 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2018-08-13T13:19: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": "11548ee5c... |
8a78a749-0a38-415b-8a21-56a40f07afe6 | LeHaiDangSPKT/Nam1-Nam2 | 2. Freshman_HKII/KTLT/B5/5_11.cpp | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int GetBit(int x, int n);
int BitCount(int x);
void LietKeTapCon(int a[], int n);
void LietKeTapConDoDai(int a[], int n, int m);
int main()
{
int a[] = { 2, 3, 7 };
LietKeTapConDoDai(a, 3, 2);
return 0;
}
void LietKeTapConDoDai(int a[],... | ALGO | 0.999693 | 3.14835 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-01-09T02:31: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": "ddacbba60245... |
f20e30cd-e5ed-4202-b6a1-817627583d3e | nanashinw/NEW_Autosumo_500g | MRC_auto500g/Trackpid.ino | #include "Newkub.h"
void tn(float Speed, float Kp, float Kd) {
position = ReadObs();
error = position - 2000;
powermotor = (Kp * error) + (Kd * (error - lasterror));
lasterror = error;
leftmotor = Speed + powermotor;
rightmotor = Speed - powermotor;
if (leftmotor > 100) leftmotor = 100;
if (leftmotor <... | ALGO | 0.997969 | 3.718748 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-04-13T08:40: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": "15a3d5f8a44... |
8715b6fc-a712-4ff5-a236-aec7d55de8d5 | freebsd/freebsd-ports | math/octave-forge-mechanics/files/patch-verletstep.cc | --- verletstep.cc.orig 2021-02-21 22:24:16 UTC
+++ verletstep.cc
@@ -45,12 +45,12 @@ DEFUN_DLD (verletstep, args, nargout, "Verlet velocity
newargs(3) = V.row(jpart);
if (fcn_str)
- retval = feval (args (4).string_value (), newargs, nargout);
+ retva... | ALGO | 0.994509 | 6.769287 | {
"github_metadata": {
"branch": "main",
"commit_count": 713138,
"repo_created_at": "2011-05-26T11:15:35.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1066,
"forks": 794,
"issues": 0,
"pull_requests": 54
},
"file_meta": {
"content_id": "89... |
9d968c34-40ce-46db-ad2f-08dec228b18b | mlk12333/loop | main.cpp | //
// main.cpp
// Loop_load_data
//
// Created by 孟令凯 on 2021/9/28.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <chrono>
#include <atomic>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <unistd.h>
#include <pthread.h>
#include <fcntl.h>
#includ... | DATA | 0.912642 | 3.452306 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-09-29T08:23: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": "d84a6b4e6dab... |
0846c274-912b-4d3a-9ac3-5b4766ebdf7e | lanbao2021/BlueLeopard | exercise/chapter4/4-12.cpp | // 4-12.cpp
// Created by 蓝同学 on 2021/8/8.
// 编写一个程序,输入一个句子(以句号结束) ,统计该句子中的,元音字母数、辅音字母数、空格数、数字数,及其他字符数。
#include <iostream>
using namespace std;
int main(){
char ch;
int num_y=0, num_f=0, num_space=0, num_digits=0, num_others=0;
while(1){
cin.get(ch);
if(ch=='.'){
cout << "元音字母数:... | ALGO | 0.987971 | 3.462665 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2021-09-01T09:26: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": "108d8aa7f... |
36803535-1db0-4f74-a47f-7547a9c81bae | Kibiandkimi/stu | Problem/Luogu/P7115.cpp | //
// Created by kibi on 24-11-2.
//
// TODO
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <stack>
#include <sys/types.h>
#include <tuple>
#include <vector>
template<typename T>
using vec = std::vector<T>;
using u32 = const unsigned int;
using u64 = const unsigned long long;
using ull = unsigned lo... | ALGO | 0.999925 | 3.210358 | {
"github_metadata": {
"branch": "master",
"commit_count": 250,
"repo_created_at": "2022-08-17T09:51: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": "5aee9194... |
321eecba-42ea-4d5d-867c-a573b9b5e789 | ishandutta2007/codeforces-i | irkstepanov/normal/671/B.cpp | #include <bits/stdc++.h>
#define all(a) (a).begin(), (a).end()
#define sz(a) (int)(a).size()
#define mp make_pair
#define pb push_back
using namespace std;
typedef long double ld;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pii;
map<ll, int> m;
void trans(pii p, ll ops, int add)
{
m.e... | ALGO | 0.999993 | 3.576707 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:39: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": "e206414ea2ab... |
2c674820-405e-4073-bb65-3db3d654d707 | kiarakim/Min_Coding | LEV25/hw03'.cpp | #include<iostream>
#include<string>
using namespace std;
string str;
int dat[52] = { 0 };
int step1() {
if (str.find("bad") != -1) return 0;
if (str.find("no") != -1) return 0;
if (str.find("puck") != -1) return 0;
return 1;
}
int step2() {
if (str.find("_____") != -1) return 0;
return 1;
}
int step3() {
for... | ALGO | 0.999204 | 3.345029 | {
"github_metadata": {
"branch": "main",
"commit_count": 89,
"repo_created_at": "2022-07-05T13:26: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": "a4d48235e33... |
d8e5853a-65b1-47ca-bba5-5a333f454aa3 | nikesh04parekh/Coding-Templates | LCA.cpp | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define mod 1000000007
#define mod1 998244353
#define timepass 1073741824
#define MAXN 100000 + 5
#define LOGN 20
using namespace std;
#define N 505
/*#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_p... | ALGO | 0.999989 | 5.102108 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-06-09T09:04: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": "43df14c847... |
6a0d599d-e66e-4f09-a28a-8f2d7732fe4f | icarus0309/LcRecord | 动态规划/416.分割等和子集.cpp | /*
* @lc app=leetcode.cn id=416 lang=cpp
*
* [416] 分割等和子集
*/
// @lc code=start
//懂了已经,但是暂时不求掌握
class Solution {
public:
bool canPartition(vector<int>& nums) {
int sum = 0;
for (int it:nums) sum += it;
//剪枝:和为奇数
if (sum % 2 == 1) return false;
//加速运算:逆序排序
sort(nu... | ALGO | 0.999949 | 5.847463 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2020-06-29T01:46: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": "37cd45e4b... |
929d8b52-81e7-448f-a099-7fd4f17ff726 | stanmatei/CPPExercises | IntroductionBook/Reactives/main.cpp | #include <iostream>
#include <fstream>
#define MAXVAL 8000
using namespace std;
ifstream in("input.txt");
int mins[MAXVAL], maxs[MAXVAL];
int main()
{
int total = 1, n, i , j, pos, aux, min_c, max_c, max_lwr, min_upr;
in >> n;
for(i = 0; i < n; i++){
in >> mins[i];
in >> maxs[i];
}
... | ALGO | 0.999954 | 3.452068 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-06-01T07:04:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "286c23b5a7... |
61b28ba4-870e-4e26-9564-86f000ab835e | Yac836/leetcode | 224.calculate.cpp | #include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
string aa(string aa);
int calculate(string s) {
std::stack<char> num;
string b = "";
for(auto e : s){
if(e != ')' && e != ' ') {
num.push(e);
}
else if(e == ' '){
}
else{
while... | ALGO | 0.999613 | 4.149556 | {
"github_metadata": {
"branch": "master",
"commit_count": 152,
"repo_created_at": "2016-12-03T02:57:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "61bc1417... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.