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 |
|---|---|---|---|---|---|---|---|
7a359291-ec72-4c37-8887-274b6254115c | grantpemberton/DataStructures | hw5/sort2.cpp | // Written by <NAME> 11/7/2014
// InsertionSort.cpp
// Sorts integers using the InsertionSort algorithm
#include "sort2.h"
using namespace std;
InsertionSort::InsertionSort(){ // constructor
sortArray.length = 0;
sortArray.arr = NULL;
}
// reads in a list of integers from stdin and returns an arr... | ALGO | 0.999096 | 4.990104 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-11-17T00:09: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": "4c055b3dae... |
310377f5-5894-4384-98e8-5cfaefa52230 | sraihan73/Lucene- | highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.h | #pragma once
#include "exceptionhelper.h"
#include "stringhelper.h"
#include <cmath>
#include <memory>
#include <string>
#include <typeinfo>
#include <unordered_map>
#include <unordered_set>
#include <deque>
// C++ NOTE: Forward class declarations:
#include "core/src/java/org/apache/lucene/analysis/TokenStream.h"
#i... | TOOL | 0.926536 | 7.748188 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-10-08T04:50:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "69304843be... |
5fb17917-3892-4267-8a0a-9b6f633c73d3 | mgtberry-5490/Zipping-and-Unzipping--Files | huffman.h | #include <vector>
#include <string>
using namespace std;
struct HNode {
char ch;
int weight;
int parent;
int childType;
};
class HuffmanTree {
public:
HuffmanTree(); // constructor
void insert(char ch, int weight); // inserts a character and its associated weight
// into a node of the ... | ALGO | 0.999904 | 4.021254 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2020-12-11T01:15:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2255e658a3b1... |
77968d2d-243b-46e4-8482-6f189d68183f | KazuhiraDZ/Extended-Kalman-Filter-Project | src/tools.cpp | #include <iostream>
#include "tools.h"
using Eigen::VectorXd;
using Eigen::MatrixXd;
using std::vector;
Tools::Tools() {}
Tools::~Tools() {}
VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations,
const vector<VectorXd> &ground_truth) {
/**
TODO:
* Calculate the RMSE... | ALGO | 0.993251 | 6.020314 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-03-09T07:20: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": "ee20ded734... |
bae67a31-2925-4bdd-b1ee-d10a413ac738 | gagandeepahuja09/Binary-Search | LeetCode/LongestDuplicateSubstring.cpp | #define ll long long int
class Solution {
public:
vector<int> power;
int MOD = 1000000007;
string isPossible(int len, string s) {
unordered_map<ll, vector<int>> mp;
ll num = 0;
for(int i = 0; i < len; i++) {
num = num + (power[i] * (s[i] - 'a' + 1));
}
mp... | ALGO | 0.999987 | 4.717871 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2019-04-01T16:39: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": "d7aca8304... |
971b1d15-4e00-4c24-910d-8ef59345120b | qingping95/ACM | Program/hiho_19/main.cpp | /*
*Rainto96
*Beijing University of Posts and Telecommunications School of Software Engineering
*http://blog.csdn.net/u011775691
*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <cstring>
#include <string>
#include <cmath>
#include <set>
#include <map>
#include <vector>
#include <... | ALGO | 0.999787 | 3.280191 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2016-04-29T15:59:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b4fe0be59... |
0e87f955-babd-461e-b39f-f09cc7248c12 | side-projects-all/works | Leetcodes/binary_tree/q_116.cpp | /*
You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following definition:
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 no... | ALGO | 0.999932 | 5.872756 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2025-01-03T05: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": "b26703bd883... |
e4a341c9-a86e-4be0-a9b0-fb58878ec408 | mrbiku001/Cpp | pwskills-assignment-010/Q3.cpp | // Q3 - Given a m*n integer matrix. If an element of the matrix is 0 then set the complete row and column of that element to 0. Make the changes inplace and print the matrix.(Hard)
// m=3
// n=3
// arr[]={{1,2,3},{1,0,1},{5,6,7}}
// Output: {{1,0,3},{0,0,0},{5,0,7}}
// arr[]={{0,1,2,0},{3,4,5,2},{1,... | ALGO | 0.999579 | 5.071848 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2022-12-30T15:43: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": "05c1c234d... |
51220b28-018d-4865-aba2-1db8167ee152 | wtksara/LaboratoryPK4 | lab5/Source.cpp | //
// main.cpp
// zadanie.cpp
//
// Created by <NAME> on 03/05/2020.
// Copyright © 2020 <NAME>. All rights reserved.
//
#include <iostream>
#include <vector>
#include <list>
#include <iterator>
#include <algorithm>
#include <numeric>
#include <iomanip>
struct movie
{
std::string title;
std::vector<int> r... | ALGO | 0.998623 | 5.300652 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-02-11T17:33: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": "5b5c16915e95... |
af2721b0-b73d-400f-9456-63830eb37e59 | slimasofia/BCC | PROGRAMAÇÃO ORIENTADA A OBJETOS I/pointers.cpp | #include <iostream>
using namespace std;
// utilizado para retornar múltiplos valores,
// acessar elementos de um array,
// alocar memória dinamicamente
//um ponteiro armazena um endereço de memória
int main(){
int n = 10;
int *ptr;
ptr = &n;
*ptr = 5; // manipulando o valor da variável n através do... | ALGO | 0.98015 | 3.784496 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2023-07-23T13:16: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": "f815d2024d9... |
b5d7744e-8898-4d3b-a24a-0fc02321705c | GoodGap/HUSTCS-BigData-2021 | 数据结构实验报告/链表/单链表演示系统.cpp | #include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <stdlib.h>
//各类常量定义如下
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10
typedef int status;//数据元素类型定义
typedef int ElemType;
typedef struct LNode ... | ALGO | 0.993367 | 3.598614 | {
"github_metadata": {
"branch": "main",
"commit_count": 119,
"repo_created_at": "2024-09-21T13:39:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 35,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb5c14c56... |
75ea9cb6-9014-4b8d-8c99-c9d93a0baef1 | thanh289/LTNC | Bai tap lap trinh (Courses)/151-199/review1.cpp | //For Unsorted Linklist
#include <bits/stdc++.h>
using namespace std;
struct Node {
int value;
Node* next;
Node(int v, Node* n = NULL){
value = v;
next = n;
}
};
/*
Print normal
Print reverse
Print k last element
*/
void printNode(Node* head){
Node* tmp = head;
w... | ALGO | 0.999615 | 4.241877 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-02-24T10:00: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": "c03c55709ca... |
c26c5821-8323-4896-b356-69dc1b1792a6 | zAcherttp/coding_exercises | Simple exercises/IT001O111/IT001O111-4/WIPnaoBo.cpp | #include <bits/stdc++.h>
using namespace std;
bool IsPrime(int a) {
for (int i = 2; i * i <= a; i++)
if (a % i == 0)
return false;
if (a == 1)
return false;
return true;
}
int main() {
int n;
cin >> n;
int nArray[n];
for (int i = 0; i < n; i++) {
cin ... | ALGO | 0.999982 | 3.704034 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2024-03-26T01:04:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "00cff8a5a04... |
c6d1432e-6443-4cdc-a26e-21a116ea0c38 | vinc3r3/csci335_kozhikov | w4/obj_dir/Vfibonacci_generator.cpp | // Verilated -*- C++ -*-
// DESCRIPTION: Verilator output: Design implementation internals
// See Vfibonacci_generator.h for the primary calling header
#include "Vfibonacci_generator.h"
#include "Vfibonacci_generator__Syms.h"
//==========
void Vfibonacci_generator::eval_step() {
VL_DEBUG_IF(VL_DBG_MSGF("+++++TOP... | ALGO | 0.988218 | 5.568886 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-08-14T08:34:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f7e7ad48f1e... |
aeb6a1a1-3524-493d-9dd2-3b948588c075 | sahill-07/CPP-DSA | BinarySearch.cpp |
#include<iostream>
#include<bits/stdc++.h>
using namespace std ;
int binarySearch(int arr[] , int n , int key){
int low = 0 ;
int high = n-1;
int mid = (low + high)/2;
while (low <= high ){
if(key == arr[mid]){
return mid ;
}
else if(key > arr[mid]){
lo... | ALGO | 0.999924 | 5.223072 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-06-14T05:41:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a8288929b68b... |
9a69153a-afc9-4a92-8309-15f65e598993 | PointCloudLibrary/pcl | registration/include/pcl/registration/transformation_estimation_svd_scale.h | /*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010-2011, <NAME>, Inc.
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permi... | ALGO | 0.977248 | 7.078443 | {
"github_metadata": {
"branch": "master",
"commit_count": 14566,
"repo_created_at": "2013-02-12T16:40:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10495,
"forks": 4656,
"issues": 432,
"pull_requests": 147
},
"file_meta": {
"content_id... |
24f96af5-668f-4653-97a5-3027361beb38 | micheeeeell/AtCoder | ARC/ARC024/B.cpp | #define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define rep(i,x) for(ll i = 0; i < (ll)(x); i++)
#define rrep(i,x) for(ll i = (ll)(x)-1;0 <= i; i--)
#define reps(i,x) for(ll i = 1; i < (ll)(x)+1; i++)
#define rreps(i,x) for(ll i = (ll)(x); 1 <= i; i--)
#define debug(x) cerr << #x << ": " << (x) << "... | ALGO | 0.999938 | 3.538928 | {
"github_metadata": {
"branch": "master",
"commit_count": 237,
"repo_created_at": "2019-06-21T04:33: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": "e181ed16... |
fd60a79c-56e9-4deb-8a1b-434f66f5731e | sriankit/cpp_codes | AMR_3.cpp | /* <NAME> */
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define FF first
#define SS second
#define s(n) scanf("%d",&n)
#... | ALGO | 0.998495 | 3.358325 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-07-19T12:56: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": "4698ad903e... |
6553dbe9-325e-4abf-8c7b-97ff4d3c0eea | SameerBramhecha/Data_Structures_And_Algorithms_Lab_Assignments | 21115_Assignment_No_5_DSAL.cpp | /*Implement all the functions of a dictionary (ADT) using hashing and
handle collisions using separate chaining using linked list.
Data: Set of (key, value) pairs, Keys are mapped to values,
Keys must be comparable, Keys must be unique.
Standard Operations:
Insert (key, value),
Find(key),
Delete(key)
ASCII Value:-
a-09... | ALGO | 0.998823 | 4.100087 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2022-05-13T07:26: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": "cc4d6975ecd... |
2f3e76b4-2d8e-4ad7-9e3c-cb40c68b2e65 | dioveath/competitive-programming | leetcode/10. Regular Expression Matching.cpp | // 10. Regular Expression Matching
// Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where:
// '.' Matches any single character.
// '*' Matches zero or more of the preceding element.
// The matching should cover the entire input string (not partial).
// ... | ALGO | 0.997855 | 5.928782 | {
"github_metadata": {
"branch": "main",
"commit_count": 324,
"repo_created_at": "2022-01-28T09:35:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "54159e40a7... |
539ce3d9-c8d6-46ab-ae75-5e10dded01aa | nick-sc/practice | 1325_effectiveHacking/1325_effectiveHacking/main.cpp | #include <iostream>
using namespace std;
int n, m, ans;
int vsit[10001];
int cnt[10001];
int map[10001][10001];
int que[100001];
int q_f = 0;
int q_r = 0;
int x, y;
void init()
{
q_f = 0;
q_r = 0;
for (int i = 1; i <= n; i++)
vsit[i] = 0;
}
void bfs(int num)
{
int cur;
cnt[num]++;
vsit[num] = 1;
for (int ... | ALGO | 0.999986 | 3.157506 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2018-02-19T06:35: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": "80300113d... |
b90919b6-aac4-4045-8b7c-1ae621bf5569 | 51n3D/image_level_morphing | Processing/include/utils/GaborFilter.h | #pragma once
#include <opencv2/opencv.hpp>
namespace processing
{
namespace utils
{
class Orientations;
class Frequencies;
/**
* \brief Trieda vylepsi kvaltu odtlacku pomocou Gaborovho
* filtra.
*/
class GaborFilter
{
private:
// members
/**
* \brief Velkost spracovavaneho bloku.
... | ALGO | 0.910251 | 5.678372 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-06-25T07:45: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": "540c66bfec01... |
6a0b5ab3-25c2-4e67-85e6-6057001c1d51 | Alex-git1/Lab12.1C-- | Lab12.1C++/Lab12.1C++/Lab12.1C++.cpp | #include <iostream>
#include <fstream>
using namespace std;
void CreateBIN(char* fname) {
ofstream fout(fname, ios::binary); // відкриваємо файл для запису
char ch;
double number;
do {
cout << "Enter a number: ";
cin >> number;
fout.write((char*)&number, sizeof(number)); // зап... | TOOL | 0.99268 | 4.457951 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-11-27T23:53: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": "04467b689ad5... |
42237a6f-984d-4d22-80cd-9a26ba70c53b | jesse99/whisper | Whisper/Source/BackEnd/Core/Source/Mac Specific/MQuickDrawUtils.h | /*
* File: MQuickDrawUtils.h
* Summary: QuickDraw utilities
* Written by: <NAME>
*
* Classes: MSavePort - Stack based class to save and restore the port.
* MSetPort - Stack based class to set and restore the port.
* MSetClip - Stack based class to set and restore the clip region.
* MI... | TOOL | 0.938808 | 5.70645 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-02-05T04:41:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9d5e60a4d9... |
fb6d2ca4-663d-4211-b15f-20c8345c2a02 | JonathanYuan23/DMOJ-Solutions | Solutions/xmascoordinates.cpp | #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize "Ofast"
#define ll long long
#define MOD 1000000007
#define p 31
#define INF 0x3f3f3f3f
#define MAXN 1005
#define pb push_back
#define LSB(S) (S & (-S))
typedef pair<int, int> pii;
typedef pair<pair<int, int>, int> piii;
typedef vector<int> vi;
typedef... | ALGO | 0.999927 | 4.03289 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-06-19T21:54:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "33142e8f37c8... |
c25b64a0-c445-44cb-a7f8-7847bcd4b124 | maleehapie/talltrees | to-do-list.cpp | #include <iostream>
#include <vector>
#include <algorithm>
void addTask(std::vector<std::string>& tasks) {
std::string task;
std::cout << "Enter task: ";
std::getline(std::cin, task);
tasks.push_back(task);
}
void viewTasks(const std::vector<std::string>& tasks) {
std::cout << "Task List:" << std::... | TOOL | 0.981161 | 6.668678 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-12-15T14:15: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": "8e828bc8e4de... |
f83f91a3-fe06-4e9b-960f-b4bb51c57084 | bartandrews/DiagHam_Stability | trunk/FQHE/src/HilbertSpace/FermionOnSquareLatticeWithSU3SpinMomentumSpace.cc | ////////////////////////////////////////////////////////////////////////////////
// //
// //
// DiagHam version 0.01 ... | TOOL | 0.994212 | 4.314694 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2022-07-12T10:41:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "874c9f550b3... |
95a322e1-c986-4a95-b34c-d5fe2bf5bbcf | mindspore-ai/models | research/cv/fairmot/infer/mxbase/src/PostProcess/FairmotMindsporePost.cpp | /*
* Copyright 2021 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | ALGO | 0.988625 | 5.086467 | {
"github_metadata": {
"branch": "master",
"commit_count": 4305,
"repo_created_at": "2021-10-15T06:38:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 362,
"forks": 101,
"issues": 13,
"pull_requests": 2
},
"file_meta": {
"content_id": "a66... |
9c85d8fc-25aa-4920-83d9-a73c189d47c5 | saadali18/OOP-interview-questions | Basic/question_1.cpp | #include <iostream>
// Functional Programming (FP):
//
// FP focuses on using functions as first-class citizens, immutability, and pure functions.
// It avoids shared mutable state and often relies on recursion.
// Object-Oriented Programming (OOP):
//
// OOP structures code around objects, encapsulating data and be... | TOOL | 0.997602 | 7.151797 | {
"github_metadata": {
"branch": "main",
"commit_count": 51,
"repo_created_at": "2023-10-22T05:40:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 21,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "91c1f84d5... |
28fdf4a5-a190-4b06-bc13-a34e43e6ab64 | sbl133/JongmanBook | 32. network/PROJECTS.cpp | #include<vector>
#include<iostream>
#include<queue>
#include<numeric>
#include<cstring>
using namespace std;
const int INF = 987654321;
int V;
// capacity[u][v] = u에서 v로 보낼 수 있는 용량
// flow[u][v] = u에서 v로 흘러가는 유량 (반대 방향인 경우 음수)
int capacity[210][210], flow[210][210];
// flow[][]를 계산하고 총 유량 반환
int networkFlow(int source,... | ALGO | 0.999911 | 4.060406 | {
"github_metadata": {
"branch": "main",
"commit_count": 91,
"repo_created_at": "2021-08-23T11:24: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": "01444fe96d5... |
efb7125b-f536-4663-8a33-1187fc69433d | aofenghanyue/numericalAnalysisHomework | homework3.h | #pragma once
#include "commons.h"
#include "MultidimensionNewtonRoot.h"
#include "BivariatePolynomialFitting.h"
#include <vector>
function<MatrixD(VectorD&)> gen_jac_mat(double x, double y) {
/*对于传入的x,y,生成其对应的方程组的雅可比矩阵,传出函数*/
auto J = [x, y](VectorD& v) -> MatrixD {
double m[25] = {
-exp(-v[0]), -2 * exp(-2 * ... | ALGO | 0.999893 | 4.009773 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-12-17T12:49:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d5d2665522... |
d4474575-9876-471d-84bf-d11214071543 | dingolfsson/HR-Tolvunarfr-1 | main.cpp | #include <iostream>
#include <math.h>
using namespace std;
void welcome();
int get_number();
void cd_floop(int x);
void cd_wloop(int y);
void r_floop(int x, int y);
void r_wloop(int x, int y);
int main () {
welcome();
int foo[10];
for (int i = 0; i < 10; i++) {
cin >> foo[i];
cout << f... | ALGO | 0.998659 | 3.322186 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2017-10-03T04:16:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5b078cd7e... |
93c947d6-43b4-4186-a9b1-d69ce1a75abb | satvik007/uva | More Advanced Topics/More Advanced DP Techniques/DP level 2/Atomic Car Race.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define inf 1e9
int n, r;
double b, v, e, f;
int a[105];
double dp[105][105];
double solve(int pos, int last){
auto index = (int)(lower_bound(a, a+n, pos) - a);
if(a[index] == pos){
if(index == n-1) return 0;
if(dp[index][last... | ALGO | 0.999849 | 3.923981 | {
"github_metadata": {
"branch": "master",
"commit_count": 275,
"repo_created_at": "2017-08-12T06:07:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f367cce5... |
efedf844-3e5c-4ba5-a7da-cf522e8e2036 | JabedWeb/cpp-contest-solutions | B_Qingshan_Loves_Strings.cpp |
//https://codeforces.com/problemset/problem/1890/B
#include <bits/stdc++.h>
using namespace std;
bool is_good(string &s) {
for (int i = 1; i < s.length(); ++i) {
if (s[i] == s[i - 1]) {
return false;
}
}
return true;
}
bool can_make_good( string &s, string &t) {
for (in... | ALGO | 0.999986 | 5.05284 | {
"github_metadata": {
"branch": "main",
"commit_count": 205,
"repo_created_at": "2023-08-05T22:34: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": "e3e4614b35... |
d6b7cb5d-92ce-4073-af3b-4edb0bc4478d | confusedconsciousness/Algorithms | Codeforces/1315C.cpp | #include<iostream>
#include<vector>
using namespace std;
int main() {
int t;
cin>>t;
while(t) {
int n;
cin>>n;
vector<int> A(n, 0);
for(int i = 0; i < n; ++i) {
cin>>A[i];
}
int upper_bound = 2 * n;
bool available[upper_bound + 1]; // init... | ALGO | 0.999587 | 3.992202 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2020-03-31T13:11: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": "a8ce0f543... |
832fa58f-5516-4e43-a1e1-8e817cc8d3ec | RituChoudhary01/DSA-SUPREME-BATCH. | 031W16Maps&TiesAssigment/PalindromePairs.cpp | // Palindrome Pairs
// https://leetcode.com/problems/palindrome-pairs/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class TrieNode {
public:
TrieNode *children[26];
int stringNumber;
bool isTerminal;
TrieNode() : stringNumber(-1), isTerminal(false) {
for (in... | ALGO | 0.999988 | 6.376156 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2025-05-28T08:45: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": "9888b546e9b... |
b73ce293-f564-4d84-ad7c-711beb2d5643 | banghartOSU/165 | week5/selectionSort.cpp | #include <string>
#include <iostream>
std::string toUpper(std::string str){
for (int i =0; i < str.length(); i++){
str[i] = toupper(str[i]);
}
return str;
}
bool isBefore(std::string first, std::string second){
std::string string1 = toUpper(first);
std::string string2 = toUpper(seco... | ALGO | 0.999787 | 4.945609 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2019-03-24T15:05: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": "9dc80e6b1... |
9bb32992-6e10-4f1c-88ce-e0d7ad2da106 | shaowei-cai-group/z3pp | src/math/lp/permutation_matrix.cpp | /*++
Copyright (c) 2017 Microsoft Corporation
Module Name:
<name>
Abstract:
<abstract>
Author:
<NAME> (levnach)
Revision History:
--*/
#include <memory>
#include "util/vector.h"
#include "math/lp/permutation_matrix_def.h"
#include "math/lp/numeric_pair.h"
template void lp::permutation_matrix<double... | TOOL | 0.940663 | 5.217044 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2022-09-03T11:40:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 48,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "219239c7b5... |
8cda564a-6bac-431f-bcfc-8e2b7e345b4a | Gyoonus/deoptfuscator | android/art/compiler/optimizing/cha_guard_optimization.cc | /*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | ALGO | 0.935054 | 6.56357 | {
"github_metadata": {
"branch": "master",
"commit_count": 133,
"repo_created_at": "2020-04-11T05:44:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 445,
"forks": 58,
"issues": 10,
"pull_requests": 0
},
"file_meta": {
"content_id": "f307... |
1bd3f7ea-dcae-40f4-987f-be381f6ec3e9 | PuddingPengChen/Magic3D | CuraEngine3/src/MergeInfillLines.h | //Copyright (c) 2018 <NAME>.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
#ifndef MERGE_INFILL_LINES_H
#define MERGE_INFILL_LINES_H
#include "pathPlanning/GCodePath.h" //To accept and generate g-code paths.
namespace cura
{
class MergeInfillLines
{
public:
/*
* Create a new merger i... | ALGO | 0.983166 | 6.209173 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2015-06-02T07:40:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 10,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "2042f5c... |
83965cef-6760-42dc-a54e-21b0c36fcf0c | Rishithp06/DailyDSA | rishith/recursion/generatesubseqsets.cpp | class Solution {
public:
// Helper function for recursion
void generateSubsets(vector<int>& nums, int index, vector<int>& current, vector<vector<int>>& result) {
// Base case: if we reach the end of the array
if (index == nums.size()) {
result.push_back(current); // Add the current s... | ALGO | 0.99996 | 6.872459 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2025-01-01T09:10: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": "31d8ab8da19... |
bd9619f0-9e4f-4a0b-9d9a-765314ed0a18 | tinhngovnptho/Code | CP/Code THPT/ONLINE JUDGE/VNOJ/hbtlca.cpp | /*
Author: Tinhnopro (<NAME>)
From: CHV Phu Tho
*/
#include <bits/stdc++.h>
using namespace std;
template <typename T, int D>
struct vec : public vector<vec<T, D - 1>> {
static_assert(D >= 1);
template <typename... Args>
vec(int n = 0, Args... args) : vector<vec<T, D - 1>>(n, vec<T, D - 1>(args..... | ALGO | 0.999699 | 4.727733 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2024-10-13T07:51: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": "bfb0f355abf... |
dd0cecfd-00a6-4e09-8a7e-4034d11b795c | fpGHwd/pat_macos | pat/floyd.cpp | //
// floyd.cpp
// pat
//
// Created by 帝君 on 2018/3/4.
// Copyright © 2018年 Rumi. All rights reserved.
//
#include <stdio.h>
#include <algorithm>
using namespace std;
static const int INF = 1e9, MAXV = 200;
static int m, n, G[MAXV][MAXV];
static void Floyd(void){
for(int k = 0; k < n; k++){
for(int... | ALGO | 0.99999 | 4.482534 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2018-03-22T10:12: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": "7b2e2d937... |
72f83a9f-ceb2-4590-bd6d-c9b066574c0c | techlism/LeetCode-Solutions | 0082-remove-duplicates-from-sorted-list-ii/0082-remove-duplicates-from-sorted-list-ii.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
// class Solution {
// private:
// void find... | ALGO | 0.999994 | 5.72083 | {
"github_metadata": {
"branch": "main",
"commit_count": 1571,
"repo_created_at": "2022-11-20T05:47:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b81a222f... |
a32d9037-4351-416b-bd13-ad5155281966 | awanSHB/DSA | Random/ExpressionTree.cpp | #include <iostream>
using namespace std;
class BT{
private:
int n;
char *A;
public:
BT(){
n = 0;
A = new char[15];
}
BT(int s){
n = 0;
A = new char[s];
}
bool isOperator(char ch){
if(ch=='^' || ch=='/' || ch=='*' || ch=='+' || ch=='-')
return true;
else
return false;
}
... | ALGO | 0.999499 | 3.764184 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-07-13T13:27: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": "93750d5aa11... |
2904fa99-99a6-4dbd-9a4c-eba00327dedf | Anurag-zr/dsa | graph/l_m_802_find_eventual_safe_state.cpp | #include<bits/stdc++.h>
using namespace std;
vector<vector<int>> create(int n,int m){
vector<vector<int>> adjList(n , vector<int>());
for (int i = 0; i < m;i++){
int u, v;
cin >> u >> v;
// directed graph
adjList[u].push_back(v);
}
return adjList;
}
bool dfs(int no... | ALGO | 0.999988 | 4.055293 | {
"github_metadata": {
"branch": "main",
"commit_count": 324,
"repo_created_at": "2022-06-01T16:31: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": "c1fa02de46... |
d72a397b-60ee-43b8-8986-507112cd9e2a | miguel-roldao/past_projects | FComp/93405/teste2/src/FCmatrixFull.cpp | #include <iostream>
#include <vector>
#include <string>
#include "FCmatrixFull.h"
using namespace std;
/*
____________ __ _ ______ ____
/ ____/ ____/___ ___ ____ _/ /______(_) __/ ____/_ __/ / /
/ /_ / / / __ `__ \/ __ `/ __/ ___/ / |/_/ /_ / / / / / /... | ALGO | 0.982007 | 4.070212 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-06-04T13:21: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": "52b72622d013... |
28836f75-d21e-4d6d-a43a-b80920b6a681 | prashantmarshal/ds-codes | LL/sumbetween0s.cpp | #include <iostream>
using namespace std;
class node{
public:
int data;
node *next;
};
class linkedlist{
public:
node *head, *start;
linkedlist(){
head = NULL;
start = head; // start pointer points to the last node in the list
}
void addNode(int num){ // node value to be added
if(head == NULL){
head = ... | ALGO | 0.999918 | 4.801073 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-10-24T19:22: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": "29b4689359... |
9670e3f7-887e-43e1-899c-8e2a97cb1ce2 | Dhiyanesh-babu/DSA---Data-Structures-and-Algorithms | DSA_Basic/5_Strings/2_Left_char_repeat.cpp | #include<iostream>
#include<string>
#include<bits/stdc++.h>
using namespace std;
/* super naive
int repeat(string s)
{
int n = s.length();
for(int i=0;i<n;i++)
{
for(int j=i+1;j<n;j++)
{
if(s[i]==s[j])
{
cout << i;
return 0;
... | ALGO | 0.999934 | 3.836854 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2022-09-10T09:44: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": "e4387e885c4... |
e23e15f9-18ad-494d-87f5-4ec318fafee9 | Supercomet/CS399 | src/vkapp_raytracing.cpp |
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <array>
#include <math.h>
#include "vkapp.h"
#define GLM_FORCE_RADIANS
#define GLM_SWIZZLE
#include <glm/glm.hpp>
using namespace glm;
#include "app.h"
#include "shaders/shared_structs.h"
void VkApp::createRtBuffers()
{
m_rtCo... | TOOL | 0.953804 | 3.972391 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2022-05-07T07:12:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0bd7d618ed5... |
f695cd3c-d862-4d71-8933-fe84deff6d69 | SJAlgorithm/SJAlgorithm | jerry0339/2020/20200402/BOJ_12869.cpp | // <뮤탈리스크> - BOJ_12869
// DP
// if문 조금 줄여보려고 하다가 더 오래걸림 그냥 생각나는대로 코딩하기...!!!
#include<bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int N; // scv수 , 1<=N<=3
int life[3]={0,}; // 1<=life<=60
int dp[61][61][61]={0,};
int a,b,c;
void chk(int i, int j, int k, int d1, int d2, int d3){
if(i-d1<0) a=0; else ... | ALGO | 0.999376 | 3.725714 | {
"github_metadata": {
"branch": "master",
"commit_count": 721,
"repo_created_at": "2020-03-18T13:38:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "f1baf8156... |
50f69fdf-ff4e-431f-8380-b3f3228b8b69 | Yukikaze030/LeetCode | top-100-liked/236.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), left(left), right(... | ALGO | 0.999996 | 6.460898 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2023-01-02T14: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": "2d89b7130b... |
6966bc2b-e15f-44a9-8247-8327ac4dabbe | Avafly/LeetCodeSolution | 063.Unique_Paths_II/Q63.cpp |
// LeetCode Problem:
// Title: Unique Paths II
// URL: https://leetcode.com/problems/unique-paths-ii/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
/**
* Idea: same as Q62.
* However, additional calculations are required due to the presence of obstacles.
* Here are some special c... | ALGO | 0.999952 | 5.956861 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-07-06T00:29: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": "a90f082e2bf... |
388d2735-7226-40c9-96dc-3ac81f3d05e6 | ishandutta2007/codeforces-n | nick452/normal/1580/D.cpp | #ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<ll> solve(const vector<ll>& a, int s, int t, int m) {
if (s > t) {
return { 0 };
}
int n = t - s + 1;
int p = s;
for (int i = s; i <= t; i++) {
if (a[i] < a[p]) {
p = i;
}
... | ALGO | 0.999834 | 3.532659 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15: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": "e836482636ef... |
8bf29355-40e2-4be3-ae6c-ece51ce737c7 | kamyu104/LeetCode-Solutions | C++/grid-illumination.cpp | // Time: O(l + q)
// Space: O(l)
class Solution {
public:
vector<int> gridIllumination(int N, vector<vector<int>>& lamps, vector<vector<int>>& queries) {
unordered_set<int64_t> lookup;
unordered_map<int, int> row, col, diag, anti;
for (const auto& lamp : lamps) {
int r, c;
... | ALGO | 0.999941 | 6.18508 | {
"github_metadata": {
"branch": "master",
"commit_count": 19395,
"repo_created_at": "2018-10-11T17:38:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4939,
"forks": 1616,
"issues": 1,
"pull_requests": 55
},
"file_meta": {
"content_id": ... |
7df5b670-3b21-475d-b53b-ee96350ea2d2 | ksobrenat32/cpcfi | problems/codeforces/750-a.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define FO(i, b) for (int i = 0; i < (b); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rFOR(i, a, b) for (int i = (a); i > (b); i--)
#define TR(v, arr) ... | ALGO | 0.999316 | 3.327465 | {
"github_metadata": {
"branch": "main",
"commit_count": 154,
"repo_created_at": "2024-08-31T00:56: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": "4342cdd172... |
97a1bf3d-8465-41dd-871a-80bcc6738180 | adityajamwal02/LeetcodeProblemSet1 | UglyNumber2.cpp | /*
An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5.
Given an integer n, return the nth ugly number.
Example 1:
Input: n = 10
Output: 12
Explanation: [1, 2, 3, 4, 5, 6, 8, 9, 10, 12] is the sequence of the first 10 ugly numbers.
Example 2:
Input: n = 1
Output: 1
Explanation: 1 has n... | ALGO | 0.999981 | 6.356884 | {
"github_metadata": {
"branch": "main",
"commit_count": 583,
"repo_created_at": "2022-07-01T03:50: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": "e77c33486b... |
08b71b12-ce09-47d9-9ec8-d7115a67ebc9 | yosupo06/library-checker-problems | convolution/convolution_mod/gen/max_ans_zero.cpp | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <vector>
#include "../params.h"
#include "random.h"
int mpow(int a, int b) {
int res = 1;
for (; b; b >>= 1) {
if (b & 1) res = (int64_t) res * a % MOD;
a = (int64_t) a * a % MOD;
}
return res;
}
int inv(int x) { return mpow(x, MOD - 2); }
in... | ALGO | 0.999949 | 3.503205 | {
"github_metadata": {
"branch": "master",
"commit_count": 3115,
"repo_created_at": "2019-05-30T20:49:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 589,
"forks": 137,
"issues": 98,
"pull_requests": 3
},
"file_meta": {
"content_id": "76... |
31f54628-0ffc-466e-8fe2-90314039aa92 | emilyju0314/gpt_code_plagiarism | dataset/code_content_classifier/allpro_train/1_7185_20.cpp | #include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <tuple>
using namespace std;
struct edge {
int v, w;
};
const int N = 1e5;
vector<edge> g[N];
int low[N], ord[N], k;
long long ws[N];
long long total;
tuple<long long, int, int> ans;
void dfs(int u, int p) {
low[u] = ord[u] =... | ALGO | 0.999983 | 4.258169 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-04-28T03:59:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c163b2e63d6... |
600b352d-9f10-45aa-bf80-b85e520a39d3 | Perilynn/HackerRank-Coding-Challenges | Fun Problems/aravind.cpp |
/*
given a char array with extra padded memory and zero byte,
replace all instances of a period with two semi colons
(c++)
*/
void ReplacePeriods(char* input) {
int length = strlen(input);
int indexOn = 2 * length - 1;
for(int i = length 1; i >= 0; i--) {
if(input[i] == '.') {
input[... | ALGO | 0.985106 | 3.233474 | {
"github_metadata": {
"branch": "master",
"commit_count": 154,
"repo_created_at": "2015-05-13T22:18:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 20,
"forks": 17,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "ad7011... |
e8f83c94-03af-43b6-b922-96a3c36520f9 | pedrosoutinho/cp-dump | 1882D.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define endl '\n'
void solve(){
int n; cin >> n;
vector<int> a(n);
for(int i = 0; i < n; i++) cin >> a[i];
vector<vector<int> > g(n);
for(int i = 0; i < n - 1;... | ALGO | 0.999689 | 4.750362 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2025-03-26T03:09: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": "a6a1cfd22c... |
ac60333b-02ce-479e-b159-35bae6fd10e2 | zwl19879775/klcommon | collections/docs/mmo/state_ai/StateImpl/GuardSearch.cpp | ///
/// @file GuardSearch.cpp
///
#include "stdafx.h"
#include "GuardSearch.h"
#include "../../Monster.h"
#include "../../Player.h"
#include "../../ServerRegion.h"
#include "../../country/CountryParam.h"
#include "../helper/AIUtils.h"
#include "../MonsterAI.h"
#include "../AIEventSender.h"
namespace StateAI
{
IMPL... | ALGO | 0.983361 | 6.008289 | {
"github_metadata": {
"branch": "master",
"commit_count": 446,
"repo_created_at": "2015-03-23T13:42:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "395237b5... |
f58904fb-61fa-42fb-a1ef-0f2dacfbcca9 | yhkim0566/algorithm | kakao/problem1.cpp | //문제 설명
//새로 생긴 놀이기구는 인기가 매우 많아 줄이 끊이질 않습니다. 이 놀이기구의 원래 이용료는 price원 인데, 놀이기구를 N 번 째 이용한다면 원래 이용료의 N배를 받기로 하였습니다. 즉, 처음 이용료가 100이었다면 2번째에는 200, 3번째에는 300으로 요금이 인상됩니다.
//놀이기구를 count번 타게 되면 현재 자신이 가지고 있는 금액에서 얼마가 모자라는지를 return 하도록 solution 함수를 완성하세요.
//단, 금액이 부족하지 않으면 0을 return 하세요.
//제한사항
//놀이기구의 이용료 price : 1 ≤ price ≤... | ALGO | 0.998893 | 4.087168 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2021-09-15T11:04: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": "3ae040e173... |
ef197545-84ff-4ec5-9782-fb29f2dcd58d | MuhammadRioAprilianto/MergeSort_0204 | MergeSort.cpp | #include <iostream>
using namespace std;
int arr[20], B[20]; // membuat array utama dan array sementara
int n; //menentukan input jumlah array
void input(){
while (true){
cout << "masukkan panjang element array : "; //menampilkan
cin >> n; // membuat input
if (n <= 20){
break... | ALGO | 0.999793 | 4.540365 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2025-04-17T03:17: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": "1ffd25f3705... |
e293f39f-9b9e-4a0b-8ff6-7ab05a210202 | anroysko/contestlib | src/polynomial/garner/code.cpp |
ll modPow(ll a, ll b, ll c) {
if (b & 1) return modPow(a, b^1, c) * a % c;
if (b > 0) return modPow(a*a % c, b >> 1, c);
return 1;
}
// Garner's algorithm for chinese remainder theorem in O(|P|^2)
// https://cp-algorithms.com/algebra/chinese-remainder-theorem.html
class Garner {
vector<int> p;
vector<vector<in... | ALGO | 0.999893 | 5.437799 | {
"github_metadata": {
"branch": "master",
"commit_count": 267,
"repo_created_at": "2018-06-25T20:12:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d0e2250... |
ac05752a-0417-43ac-bf07-21d408db6af5 | Bholu22/Dynamic-Programming | KnapSack.cpp | /*
Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack.
In other words, given two integer arrays val[0..n-1] and wt[0..n-1] which represent values and weights associated with n items respectively.
Also given an integer W which represents kna... | ALGO | 0.999996 | 4.800634 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-06-06T02:02:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "38d656c4c... |
7adb1a66-157a-4ac0-92cc-49ec84681a65 | RosettaCommons/rosetta | source/src/protocols/loop_modeling/refiners/MinimizationRefiner.hh | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... | ALGO | 0.990228 | 7.161797 | {
"github_metadata": {
"branch": "main",
"commit_count": 11737,
"repo_created_at": "2023-11-17T16:42:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 296,
"forks": 100,
"issues": 27,
"pull_requests": 9
},
"file_meta": {
"content_id": "a352... |
20c8824e-9e92-471f-8f35-1a2d60dacd87 | ititorit/SPOJ | P141PROC.cpp | // contest: http://www.spoj.com/PTIT/problems/P141PROC/
#include <bits/stdc++.h>
#define _for(i,a,b) for(int i=(a),_b_=(b),_d_=(a<b?1:-1);i!=_b_;i+=_d_)
#define FOR(i,a,b) for(int i = a; i <= b; i++)
#define FORD(i,a,b) for(int i = a; i >= b; i--)
#define _it(i,v) for (typeof((v).begin()) i = (v).begin(); i != (v).e... | ALGO | 0.999862 | 3.969404 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2016-10-13T03:24:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff45a2236... |
543a2367-d540-4259-b7a8-53f9c9bae06b | nya3jp/icpc | gnc/20060408/2131.cc | #include <vector>
#include <limits>
#include <cstdio>
using namespace std;
struct UnionFind {
struct Node {
int left, right;
vector<int> v;
Node* next;
Node* last;
Node() : left(-1), right(-1), v(), next(0), last(0) {
last = this;
}
};
vector<int... | ALGO | 0.999975 | 3.64742 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2012-05-15T15:59:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc24ebb539... |
c3192ef4-0fe9-41f6-bc0d-35995174b82d | Kimhayoung0311/ICPC | findCard.cpp | //
// findCard.cpp
// ICPC_regional
//
// Created by 김하영 on 2018. 4. 3..
// Copyright © 2018년 HAYOUNG_KIM. All rights reserved.
//
/*
#include <stdio.h>
#include <vector>
#include <algorithm>
using namespace std;
int main(void){
int n,m;
scanf("%d",&n);
vector<int> arr;
for(int i=0; i<n; i++)... | ALGO | 0.999961 | 4.858003 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-12-26T07:38: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": "49e712dee3... |
83fc19f1-8e93-415d-ac94-4ac6407ec048 | d-coder111/DSAmplify | C++/350_Intersection_of_Two_Arrays_2.cpp | /*
Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as it shows in both arrays and you may return the result in any order.
Example 1:
Input: nums1 = [1,2,2,1], nums2 = [2,2]
Output: [2,2]
Example 2:
Input: nums1 = [4,9,5], nums2 = [9,4... | ALGO | 0.999994 | 6.377204 | {
"github_metadata": {
"branch": "main",
"commit_count": 303,
"repo_created_at": "2023-10-06T22:45:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 28,
"forks": 60,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d9821062... |
76f82397-219c-420e-ae4b-e7871f5fb085 | ashishchauhan0001/DSA | SDE_SHEET/Backtracking/RatInAMaze.cpp | void solve(int i, int j, vector<vector<int>> &mat, vector<vector<int>> &vis,
string &ans, int n, vector<string> &sol)
{
if (i == n - 1 && j == n - 1)
{
sol.push_back(ans);
return;
}
// right
if (j + 1 < n && mat[i][j + 1] == 1 && !vis[i][j + 1])
{
vis[i][j] = ... | ALGO | 0.999947 | 5.081967 | {
"github_metadata": {
"branch": "main",
"commit_count": 71,
"repo_created_at": "2024-07-11T13:06:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3b8c382bb2e... |
5ddd1d0f-7118-4351-8c75-79561bf19ecf | vfolunin/archives-solutions | UVa Online Judge/10088.cpp | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <string>
using namespace std;
struct Point {
long long x, y;
Point() {}
Point(const Point &a, const Point &b) : x(b.x - a.x), y(b.y - a.y) {}
long long crossProduct(const Point &that) c... | ALGO | 0.999327 | 4.384991 | {
"github_metadata": {
"branch": "master",
"commit_count": 2367,
"repo_created_at": "2017-11-27T10:19:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 1,
"pull_requests": 5
},
"file_meta": {
"content_id": "4ae9e2a... |
b0ebe235-ee1f-45f7-84b5-b7f4fac7e77e | AlJalTtakKalSen/AlJalTtakKalSen | SooYeon/231204_week/Programmers_43238_입국심사.cpp | #include <bits/stdc++.h>
using namespace std;
long long solution(int n, vector<int> times) {
long long answer = 0;
// 입국 심사에 가장 오래 걸리는 심사관을 알기 위해 정렬 [오름차순]
sort(times.begin(), times.end());
// 입국 심사에 걸리는 시간의 최소값이 1분이기 때문에 시작을 1분으로
// 입국 심사에 걸리는 시간의 최대값은 정렬한 리스트의 마지막 인덱스 값
long long st... | ALGO | 0.999951 | 4.840925 | {
"github_metadata": {
"branch": "main",
"commit_count": 527,
"repo_created_at": "2023-11-24T08:43:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fe592f47f1c... |
a25ad87d-7737-47cf-a6c0-a1328257ef35 | sheering000/Algorithm-Learning | class005/MergeList.cpp | // 合并两个有序链表
#include <bits/stdc++.h>
using namespace std;
struct Node{
int data;
Node *pre = NULL;
Node *next = NULL;
Node(int data = 0):data(data){}
};
// 创建一个链表
Node* newList(int num[],int n){
if(n==0) return NULL;
Node *head = new Node(num[0]);
Node *cur = head;
for(int i=1;i<n... | ALGO | 0.999996 | 4.508639 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2025-07-04T10:09: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": "c7f2e7662d7... |
094d235e-a3f8-4c41-9986-5ab1ba8d33b5 | k-kashapov/Space- | src/linalg.cpp | #include "linalg.hpp"
float dot(const v3f &a, const v3f &b) { return a.x * b.x + a.y * b.y + a.z * b.z; }
float norm2(const v3f &v) { return dot(v, v); }
float norm(const v3f &v) { return std::sqrt(norm2(v)); }
float norm_l1(const v3f &v) { return std::abs(v.x) + std::abs(v.y) + std::abs(v.z); }
v3f normalized(con... | ALGO | 0.993875 | 6.228664 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2025-01-08T14:16:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7508ac745... |
5ee8416c-ab27-4e19-a49f-c9eb6370818f | vincentRedDuck/Interview | automated_grading_system/lab12/studentCode/lab12-1/stu110511173.cpp | #include <iostream>
#include <iomanip>
using namespace std;
void fill_in(int n,int k ,int& a, int& b ,int **pos,int& num);
int main()
{
int p;
cin >> p;
while(p!=(-1))
{
int q = p;
int **vec = new int *[p];
for (int i = 0;i < p; i++)
vec[i] = new int [p];
... | ALGO | 0.99837 | 3.453693 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-03-04T12:07: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": "19c525f558... |
597969ac-6312-4616-8971-3de82e0a3f6a | yutyan0119/Atcoder | ABC/ABC251/D.cpp | #include <bits/stdc++.h>
using namespace std;
template <typename T>
bool chmin(T& a, const T& b) {
if (a > b) {
a = b; // aをbで更新
return true;
}
return false;
}
template <typename T>
bool chmax(T& a, const T& b) {
if (a < b) {
a = b; // aをbで更新
return true;
}
return false;
}
#define rep(i... | ALGO | 0.999767 | 3.316731 | {
"github_metadata": {
"branch": "main",
"commit_count": 164,
"repo_created_at": "2021-10-02T09:59: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": "06f0bce5b8... |
7d363cfb-4c65-42e5-9e03-5a59c290288a | rrozek/blocks | src/helpers/Config.cpp | #include <string>
#include <iostream>
#include "Config.hpp"
#include <cxxopts.hpp>
/**
* Define version
*/
#if defined(PROJECT_VERSION)
const std::string helpers::Config::version = PROJECT_VERSION;
#else
throw new std::exception("The -DPROJECT_VERSION flag was not set.");
#endif
/**
* Define name
*/
#if defined... | CONFIG | 0.932434 | 5.991573 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-09-23T05:11: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": "27e40c9297... |
56c035f2-7f83-4232-b6e5-65f3d9e062da | Ishasharmax/220-DJ-Project | SongLib.cpp | //
// Created by <NAME> on 12/3/18.
//
#include <string>
int binFind(const int* const arrayPtr, const int size, const int numToFind, int& numLinesRun, int low, int high);
int binFind(const int* const arrayPtr, const int size, const int numToFind, int& numLinesRun, int low, int high) {
int mid;
numLinesRun+=7;
... | ALGO | 0.998938 | 4.744622 | {
"github_metadata": {
"branch": "master",
"commit_count": 135,
"repo_created_at": "2018-11-26T16:49: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": "0009deeb... |
8c323f84-8c35-4758-9c16-254871fa6d66 | data61/MP-SPDZ | GC/SemiSecret.hpp | /*
* SemiSecret.cpp
*
*/
#ifndef GC_SEMISECRET_HPP_
#define GC_SEMISECRET_HPP_
#include "GC/ShareParty.h"
#include "GC/ShareSecret.hpp"
#include "Protocols/MAC_Check_Base.hpp"
#include "Protocols/DealerMC.h"
#include "SemiSecret.h"
#include "Semi.h"
namespace GC
{
template<class T, class V>
const int SemiSecretB... | TOOL | 0.927457 | 6.98812 | {
"github_metadata": {
"branch": "master",
"commit_count": 926,
"repo_created_at": "2018-10-11T01:16:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1050,
"forks": 323,
"issues": 10,
"pull_requests": 3
},
"file_meta": {
"content_id": "1e5... |
81eecf27-f30b-44aa-8e51-3cdafd4ca018 | lililuya/CCTag-for-python-usage | src/cctag/Detection.hpp | /*
* Copyright 2016, Simula Research Laboratory
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef VISION_CCTAG_DETECTION_HPP_
#define VISION_CCTAG_DETEC... | ALGO | 0.943421 | 6.542083 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2025-07-03T15:06:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a9250041625... |
8b4f49b3-b582-484b-ae52-a27895627001 | hasikill/CalcExpression | Project_20181220/Project_20181220/main.cpp | #include <iostream>
#include "CMyStack.h"
char index_signed[] =
{
'+',
'-',
'*',
'/',
'(',
')'
};
/*
> > < < < > >
> > < < < > >
> > > > < > >
> > > > < > >
< < < < < =
> > > > > >
< ... | ALGO | 0.999972 | 4.104307 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-12-21T06:02:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "82ef9133ad... |
b0840741-b18e-4755-9875-3100f6c19801 | halfmanli/ChipletDesignFlow | CombinationFlow/tool/tgff/src/RMath.cc | // Copyright 2017 by <NAME>.
// All rights reserved.
#include "RMath.h"
#include "Epsilon.h"
#include "RAlgo.h"
#include "RGen.h"
#include "RString.h"
#include <typeinfo>
#include <cstddef>
#include <set>
#include <iostream>
/*###########################################################################*/
namespace r... | ALGO | 0.999322 | 4.580946 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-10-11T03:27:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f9b9c73ab... |
fd94414c-9658-4ee8-9fdb-4fa18458bbcd | ishandutta2007/codeforces-s | shnirelman/normal/1704/A.cpp | #include <bits/stdc++.h>
#define f first
#define s second
using namespace std;
using li = long long;
using ld = long double;
using pii = pair<int, int>;
const int INF = 2e9 + 13;
const li INF64 = 2e18 + 13;
const int M = 998244353;
//const int M = 1e9 + 7;
//const int M = 32768;
const int N = 5e5 + 13;
const int LOG... | ALGO | 0.999986 | 4.335363 | {
"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": "4f6004619b32... |
bcf2ca16-6e81-4995-a4f5-253226f05e34 | arafat-hasan/problem-solving | LightOJ/1088 - Points in Segments.cpp | /*
* FILE: 1088 - Points in Segments.cpp
*
* @author: Md. <NAME> <arafathasanjenin[at]gmail[dot]com>
*
* LINK: lightoj.com/volume_showproblem.php?problem=1088
*
* Description:
*
* DEVELOPMENT HISTORY:
* Date Change Version Description
* ----------------------------------------------... | ALGO | 0.999833 | 4.30749 | {
"github_metadata": {
"branch": "master",
"commit_count": 236,
"repo_created_at": "2017-10-16T19:27:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a3adf45... |
fe0b09e7-5b95-4759-ad0f-38c779c9a06f | Uzer447/Data-Structures-Leetcode | 2140-longest-subsequence-repeated-k-times/longest-subsequence-repeated-k-times.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
string longestSubsequenceRepeatedK(string s, int k) {
int n = s.size(), maxLen = min(7, n / k);
vector<int> freq(26);
for (char c : s) ++freq[c - 'a'];
vector<char> letters;
for (char c = 'z'; c >= 'a'; -... | ALGO | 0.999971 | 5.25753 | {
"github_metadata": {
"branch": "main",
"commit_count": 2953,
"repo_created_at": "2024-10-08T18:05: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": "e63a58123... |
62606644-10e6-4444-96c5-a654ba090f2c | adithyarana/DSA-problems-in-C- | linked_list/circular_linked_list.c++ | # include<iostream>
# include<map>
using namespace std;
class node{
public:
int data;
node*next;
// constructor
node(int d){
this->data=d;
this->next=NULL;
}
// destructor
~node(){
int value=this->data;
if(this->next!=NULL){
delete nex... | ALGO | 0.9999 | 4.815547 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-10-19T09:56:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c188fbbf7b1a... |
8e1ed402-5352-422a-81db-ec2c0262dec1 | keunbum/hackers-delight | programmers/77486/sol.cpp | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "template/debug.hpp"
#else
#define debug(...) void(0)
#endif
vector<int> solution(vector<string> enroll, vector<string> referral, vector<string> seller, vector<int> amount) {
map<string, int> mp;
int n = (int) enroll.size();
mp["-"] = n;
vec... | ALGO | 0.999687 | 4.223685 | {
"github_metadata": {
"branch": "main",
"commit_count": 573,
"repo_created_at": "2022-01-24T13:03: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": "54313b4b21... |
acb0a851-e773-4b9c-8fc8-f9f4c8bdc102 | Ovishake1607066/Solved-Codechef-problems | Solved problems on contest/Squared Subsequences .cpp | #include<bits/stdc++.h>
using namespace std;
#define read FILE *fp;\
fp=freopen("testcase.txt","r",stdin);
#define ll long long
#define ull unsigned long long
#define sf(n) scanf("%I64d",&n)
#define pf(n) printf("%I64d\n",n)
#define loop for(long long i=0;i<n;i++)
#define lp(b,n) for(long long i=b;i<=n;i++)
#define pb(... | ALGO | 0.999836 | 3.250661 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-05-13T18:31:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f3aa7fd1c... |
738a3aa1-1158-4951-9999-6f35dd6a00aa | imkhkim/Al9rithmStudy | sizhf1231/week_17/SWEA_4615_재미있는_오셀로_게임.cpp | #include <iostream>
#include <cstring>
#define B 1 // black
#define W 2 // white
using namespace std;
int dx[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int board[9][9];
int N, M;
bool dfs(int x, int y, int color, int dir)
{
int nx = x + dx[dir];
int ny = y + dy[dir];
... | ALGO | 0.999893 | 4.114294 | {
"github_metadata": {
"branch": "main",
"commit_count": 266,
"repo_created_at": "2023-07-20T12:41:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9d3837f81b... |
47a8d977-2446-4563-b962-18930ea50e60 | EmmaSteinman/cs-173 | Projects/LightProject.cpp | //=========================================================
// <NAME>
// February 1, 2017
// LightProject.cpp
// This program determines whether any security lights are
// on when the mailman arrives.
//=========================================================
#include <iostream>
using namespace std;
int light(int, i... | ALGO | 0.993975 | 4.619506 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-04-20T05:11:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2874b26a78... |
50c8541e-c9a6-4751-ad78-02f33083951d | RodriguesAlonso/UNIVESP | Estruturas de dados/douglas Maioli/Queue/queue.cpp | #include<iostream>
#include<cstddef>
#include"queue.h"
using std::cout;
using std::cin;
using std::endl;
Queue::Queue(){
front = NULL;
rear = NULL;
}
Queue::~Queue(){
NodeType* tempPtr;
while (front != NULL)
{
tempPtr = front;
front = front->next;
delete tempPtr;
}
... | TOOL | 0.913709 | 4.164542 | {
"github_metadata": {
"branch": "main",
"commit_count": 497,
"repo_created_at": "2020-11-23T20:45: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": "f86259fb8b... |
9e420a85-3142-4afb-b234-2484b5a82c93 | noxii11/tic-tac-toe | tttgame.cpp | #include <iostream>
#include <vector>
using namespace std;
enum class Player { None, X, O };
class TicTacToe {
private:
vector<vector<Player>> board;
Player currentPlayer;
public:
TicTacToe() : board(3, vector<Player>(3, Player::None)), currentPlayer(Player::X) {}
void play() {
bool gameove... | ALGO | 0.997488 | 6.914791 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-06-08T06:56: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": "3268b45af75b... |
e9e46e3c-4d37-4ff8-a459-bc2fcc2b2656 | mfbari/esso | src/iz_priority_queue.hpp | #ifndef IZ_PRIORITY_QUEUE_H
#define IZ_PRIORITY_QUEUE_H
#include <vector>
#include <unordered_map>
//#include <iostream>
//using namespace std;
namespace izlib {
template <class item_type = int,
class key_type = int,
class compare = std::less<key_type>,
class item_type_hash = std::hash<item_typ... | ALGO | 0.98574 | 5.156758 | {
"github_metadata": {
"branch": "master",
"commit_count": 265,
"repo_created_at": "2019-04-04T22:56:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "981d4785... |
0d238f85-41e4-4c1c-9915-d58d56b9ff06 | bvquoc/CP-Trainning-2021 | 0 - Contest 2020/Ninh Binh PreVNOI 2017/PREVNOIB/Contestants/Ti082/TEAWORLD.cpp | #include<bits/stdc++.h>
#define maxn 2005
#define ll long long
#define db double
using namespace std;
template<typename T> inline void read(T &x)
{
char c;
bool neg = false;
while (!isdigit(c = getchar()) && c != '-');
x = 0;
if (c == '-')
{
neg = true;
... | ALGO | 0.999802 | 3.849402 | {
"github_metadata": {
"branch": "master",
"commit_count": 611,
"repo_created_at": "2020-06-03T07:47:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c4be119c... |
da326999-93b0-430f-a0dd-c2fc0aa28c90 | Hardik2972/2K22-CO-189_hardik_garg_DS | Exp54_bst_creation_deletion/code.cpp | #include <iostream>
class Node {
public:
int data;
Node* left;
Node* right;
Node(int value) : data(value), left(nullptr), right(nullptr) {}
};
class BinarySearchTree {
public:
BinarySearchTree() : root(nullptr) {}
// Function to insert a value into the BST
void insert(int value) {
... | ALGO | 0.999977 | 6.857696 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-10-25T16:39:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7155b4e76f... |
5ddec058-084a-4fca-827f-cd31ed6737ca | murtazashah548/DSA | LinkedList/SwappingNodesInALinkedList.cpp | //method 1 (lakshay)
//we break the problem into case,we use variables like leftnode and right node that represent the nodes to be swapped
//left node is the position of k from the beginning and right node is the position of k from the ending(but the position of right node,we will calculate it from the beginning)
//lef... | ALGO | 0.999993 | 6.002694 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2025-03-15T09:37: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": "af75e8b880... |
3be71d69-955d-445f-944b-41291a49ee01 | jrefsgaard/rmat | src/rmat/threebody/PeakWeight.cpp | #include <iostream>
#include <complex>
#include <cmath>
#include <armadillo>
#include <array>
#include <TLorentzVector.h>
#include <logft/phase_space.h>
#include <rmat/threebody/PeakWeight.h>
#include <rmat/RMatrixUtils.h>
using namespace std;
using namespace arma;
using namespace logft;
namespace rmat::threebody {
P... | ALGO | 0.999488 | 4.85676 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2020-03-23T23:38: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": "353969b98... |
4c417863-1d8f-4591-af56-bbdc540e1f85 | artfin/mcint | MCMC/src/diatom_exact.cpp | #include "constants.hpp"
#include <cmath>
#include <iostream>
#include <random>
#include <string>
#include <sstream>
#include <fstream>
#include <gsl/gsl_histogram.h>
using namespace std;
const double MU = ( MCONST::HE_MASS * MCONST::AR_MASS ) / ( MCONST::HE_MASS + MCONST::AR_MASS) * WCONST::DALTON / WCONST::AMU;
c... | ALGO | 0.987835 | 4.104222 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2017-07-12T21:44: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": "6282435ce... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.