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 |
|---|---|---|---|---|---|---|---|
034cb1e1-f3e3-437d-b679-a952ceddd67e | lazybug19/DSA-QuestionBank | DP/DiffPartitionCount.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
const static int mod = 1e9 + 7;
int countPartitions(int n, int d, vector<int> &arr)
{
int sum = 0;
for (int x : arr)
sum += x;
if ((sum - d) % 2 != 0)
... | ALGO | 0.999918 | 5.852797 | {
"github_metadata": {
"branch": "main",
"commit_count": 142,
"repo_created_at": "2024-07-23T19:09:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "859007c9a5... |
851b9926-6e04-45cb-ade9-1b493a2581a4 | akinouta/votesearch | tests/test_degree.cpp | #include "search.h"
using namespace std;
int find_first_node_with_5_neighbors(const AdjList &graph) {
// 遍历所有节点
for (size_t i = 0; i < graph.size(); ++i) {
if (graph[i].size() == 5) { // 检查邻居数量是否为 5
return i; // 返回第一个符合条件的节点
}
}
return -1; // 如果没有找到,返回 -1
}
int main(int ... | ALGO | 0.995116 | 4.07157 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2024-12-13T11:41:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b7df5be25... |
74c7d27f-d6f3-4f69-bc79-71ecdc93a5fd | sharma-anubhav/cppCode | quick_sort.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <limits.h>
#include <string>
using namespace std;
int pivot(vector<int> &arr, int start, int end)
{
int pivot = arr[end];
int i = start - 1;
int j = start;
while (j < end)
{
if (arr[j] < pivot)
... | ALGO | 0.999961 | 5.773967 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-02-19T06:39: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": "0f3d2a4f89... |
ecf027ce-e51e-49bd-9f8e-3487895f797e | adam-brz/SimpleMatrix | matrix.h | #ifndef MATRIX_H
#define MATRIX_H
#include <stdint.h>
#include <initializer_list>
template <typename T>
class Vector;
template <typename T = double>
class Matrix
{
private:
T *matrix = nullptr;
uint8_t rowCount = 0;
uint8_t columnCount = 0;
public:
static Matrix<T> unitMatrix(uint8_t size);
stat... | TOOL | 0.912627 | 6.713801 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2019-12-21T20:11:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7ccae04f4... |
0c5cf415-c0a2-4c54-9c22-c0cbea78227b | JIDoctor-alt/vsc | 代码集合/2021上半年/Test1/喊山.cpp | #include<iostream>
#include<vector>
#include<cstring>
#include<queue>
using namespace std;
int visited[10010];
int connect[10010][10010];
int ves[10010];//存取该顶点所能传到的地方
int N,M,K;
int ans ;
int max_len,min_id ;
vector< vector<int>> G;
void bfs(int v){
queue<int> pq;
visited[v] = 1;
pq.push(v);//根结点入队
... | ALGO | 0.999976 | 4.037369 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2021-01-08T08:19:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "506c800ad... |
dc2248ab-e44b-4c93-9c2e-38be8eaa135a | arazi47/bacalaureat-and-college-admission-practice-problems | Nesortate/random2.cpp | #include <iostream>
#include <cstring>
using namespace std;
void suma_cifrelor()
{
int n, s = 0;
cin >> n;
while (n)
{
s += n % 10;
n /= 10;
}
cout << s;
}
void oglindit()
{
int n;
cin >> n;
int n2 = 0;
while (n)
{
n2 = n2 * 10 + n % 10;
n ... | ALGO | 0.99969 | 3.732822 | {
"github_metadata": {
"branch": "master",
"commit_count": 116,
"repo_created_at": "2016-05-23T15:50:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "26ab1829... |
6a0d0f06-d49f-4fef-9853-0700caa50139 | ex-MingNine9999/algorithm | Problems/boj15460.cpp | //Problem Number : 15460
//Problem Title : My Cow Ate My Homework
//Problem Link : https://www.acmicpc.net/problem/15460
#include <iostream>
#include <vector>
using namespace std;
int s[100001];
int m[100001];
vector<int> v;
int main(void)
{
ios::sync_with_stdio(false);
cin.tie(0);
int n, input;
ci... | ALGO | 0.999904 | 3.151188 | {
"github_metadata": {
"branch": "master",
"commit_count": 160,
"repo_created_at": "2020-03-25T07:39:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bcd673e8... |
46ee1018-d936-432c-9f8f-d2cbe6477e4b | amyznikov/SerStacker | core/proc/image_registration/c_jovian_derotation2.h | /*
* c_jovian_derotation2.h
*
* Created on: Aug 28, 2024
* Author: amyznikov
*/
#pragma once
#ifndef __c_jovian_derotation2_h__
#define __c_jovian_derotation2_h__
#include <opencv2/opencv.hpp>
#include "c_jovian_ellipse_detector2.h"
class c_jovian_derotation2
{
public:
bool detect(cv::InputArray refere... | ALGO | 0.970091 | 6.441503 | {
"github_metadata": {
"branch": "main",
"commit_count": 1064,
"repo_created_at": "2021-07-13T13:20:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 1,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "697e487b... |
e2595638-a175-4620-a74f-d5e723c686fb | YIUECHEN/cplus | RBTree/RBTree/RBTree.h | #pragma once
#include<iostream>
using namespace std;
#if 0
enum Color{ RED, BLACK };
template<class T>
struct RBTreeNode{
RBTreeNode(const T& data=T(), Color color= RED) :
_pLeft(nullptr),
_pRight(nullptr),
_pParent(nullptr),
_color(color),
_data(data)
{}
RBTreeNode<T>* _pLeft;
RBTreeNode<T>* _pRight;
RBTr... | ALGO | 0.946494 | 3.927255 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2019-10-17T04:32:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "42cfd4db3... |
1eb16baa-5c5e-4a5d-8532-10cc8405cc5e | wym6912/ACM-ICPC_wym6912 | BZOJ/2120.cpp | //#define NOSTDCPP
//#define Cpp11
#define Linux_System
#ifndef NOSTDCPP
#include <bits/stdc++.h>
#else
#include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstring>
#include <cstdio>
#include <deque>
#include <exception>
#include <functional>
#include <iomanip>
#include <iostream>
... | ALGO | 0.999601 | 3.574092 | {
"github_metadata": {
"branch": "master",
"commit_count": 363,
"repo_created_at": "2017-08-09T05:04:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "799d3d97... |
128e3965-99ea-4de6-a654-421796199e18 | george-popoiu/infoarena_campion | infoarena_campion/ghiozdan.cpp | #include<fstream>
#define inf "ghiozdan.in"
#define outf "ghiozdan.out"
#define NMax 20001
#define GMax 75001
#define WMax 201
#define INF 0x3f3f3f3f
using namespace std;
fstream f(inf,ios::in), g(outf, ios::out);
int best[GMax]; //best[i] = nr minim de obiecte cu care se poate obtine greutatea i
int v[WMax]; //v[i] ... | ALGO | 0.999956 | 3.184886 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2012-08-08T12:14:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e3e0a911e... |
6062a241-46de-4884-8548-aae819de6e52 | google/graph-mining | in_memory/generation/erdos_renyi.cc | // Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... | TEST | 0.994997 | 7.693903 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2021-07-26T01:37:31.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 679,
"forks": 37,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "b8377b878... |
4d381807-6b1c-4142-8f78-fddfa41f47b1 | data-infra/matlab2c | matrix/matlab2c/matrix1.cpp | #include "Matlab2c.h"
using namespace Matlab2c;
//产生以输入元素为对角元素的矩阵
//输入为行向量或列向量,输出为以该向量为对角线的矩阵。
Matrix Matlab2c::blkdiag(Matrix& a)
{
Matlab2c::CheckLicense();
Matrix p(a.row*a.column,a.row*a.column);
for (int i=0;i<p.row;i++)
for (int j=0;j<p.column;j++)
{
if (i==j)
p(i,j)=a(j);
else
p(i,j)=0;
}... | ALGO | 0.972828 | 3.338836 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2018-03-05T14:29:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 19,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "3469a8943... |
bc7b565e-d578-43e4-b821-5a14de11ace7 | fairlight1337/GDAPlanner | include/gdaplanner/planners/ForwardPlanner.h | #pragma once
#ifndef __FORWARDPLANNER_H__
#define __FORWARDPLANNER_H__
#include <memory>
#include <iosfwd>
#include <gdaplanner/Planner.h>
#include <gdaplanner/contexts/PDDL.h>
#include <gdaplanner/problems/PDDL.h>
namespace gdaplanner {
namespace planners {
bool holds(Expression const& goal, Expression const&... | ALGO | 0.989188 | 6.754354 | {
"github_metadata": {
"branch": "master",
"commit_count": 160,
"repo_created_at": "2016-09-29T07:24:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "28409479... |
70db967d-f2fe-4622-b0c9-ba7404c8d9b0 | ElectronicJune/MCC2023 | mobilegame.cpp | #include<bits/stdc++.h>
#define all(arr) arr.begin(), arr.end()
#define print(arr) {for (auto &i : arr) cerr << i << ' '; cerr << '\n';}
using namespace std;
void solve(){
int n, a, b;
cin >> n >> a >> b;
vector<int> enemies(n);
for (int i = 0; i < n; ++i){
cin >> enemies[i];
}
sort(enemies.rbegin(), e... | ALGO | 0.999877 | 3.381665 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-11-06T03:06: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": "9efcc71020... |
6200661b-6afa-4c20-890b-1cbc1967f0c5 | 0Daxx/DSA | dsaFoundation/vid33_REcurArrStr/main.cpp | #include <iostream>
using namespace std;
int readArrViaRecur(int arr[] , int idx , int len) {
// if(idx == len ) return 0;
// cout << (arr[idx]) << ", ";
// readArrViaRecur(arr, ++idx,len);
// APP II : print reverse
if(idx == len ) return 0;
readArrViaRecur(arr, ++idx,len);
cout << ... | ALGO | 0.997992 | 3.657644 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2025-07-03T06:34: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": "d4ba1f100b9... |
0f41012c-4670-4e7b-87c8-fad36b35541c | adxtop1/ds_algo_coursera | Data_Structures_Course-2/Binary Search Tree/3_is_bst_hard.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#if defined(__unix__) || defined(__APPLE__)
#include <sys/resource.h>
#endif
using namespace std;
using std::vector;
using std::ios_base;
using std::cin;
using std::cout;
class TreeOrders {
vector <int> key;
vector <int> left;
vector <int> right;
pu... | ALGO | 0.999704 | 4.263093 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2021-05-18T19:59: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": "d42ac0ea1bd9... |
9f37bbea-f100-4ecc-9118-618381c89e3f | ishandutta2007/codeforces-m | maximumshot/normal/1712/F.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ui = unsigned int;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
const int inf = 1e9;
const ll inf64 = 1e18;
struct output {
vector<int> res;
void print() ... | ALGO | 0.999526 | 4.390635 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03: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": "eed24f75d5b7... |
53201a15-8c90-4376-85f5-e357ce6d49cd | CalebBesser/School | CSCI411/Week5_Graph_Problems/main.cpp | #include<climits>
#include<algorithm>
#include<queue>
#include<math.h>
#include<vector>
#include<iostream>
#include<string>
#include<utility>
using namespace std;
#ifndef TIMESTAMP_H
#define TIMESTAMP_H
class TimeStamp{
public:
TimeStamp(): d(0), f(0){};
int d; //discovery time
int f; //finish time
};
#endif
/**... | ALGO | 0.998683 | 4.259574 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2023-02-16T18:38: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": "c4268189f36... |
38bb6975-c524-447b-912e-2dac63fbab96 | alikhan2002/Codeforces | 764/c.cpp | #include <bits/stdc++.h>
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()
#define ll long long
#define rep(i, n) for(int i = 0; i <... | ALGO | 0.999752 | 4.329407 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-10-25T12:36: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": "0d81fbeb26ae... |
dc773c71-c319-45a0-91e4-ec486723485d | Joaco-gavernet/competitive-programming | cses/graph-algorithms/flight-routes-check.cpp | /* AUTHOR: <NAME> */
#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
#ifdef LOCAL
#define DBG(x) cerr << #x << " = " << (x) << endl
#define RAYA cerr << "===============================" << endl
#else
#define DBG(x)
#define RAYA
#endif
typedef long long ll;
typedef vector<ll> vi; typedef pair<l... | ALGO | 0.999993 | 3.501662 | {
"github_metadata": {
"branch": "master",
"commit_count": 523,
"repo_created_at": "2023-07-10T02:25:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e8bae8a8... |
62baf0b9-03a3-49ad-a036-f36ce2dfcdc0 | timezover/OpenGL-Project | main.cpp | //----------------------------------------------------------------------------------------
/**
* \file main.cpp
* \author <NAME>
* \date 21.04.2024
* \brief Main file of a project, that joins all activity in the scene, such as
creating, updating and deleting objects, moving, animation, etc.
*/
/**
... | TOOL | 0.90567 | 4.404541 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-03-06T21:02:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f050274ffde3... |
d34c2402-c938-467f-aa90-69ebe2b955c1 | codesniper99/Coding-Competitions | CodeJam/Swords/main.cpp | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define ll long long int
#define li long int
using namespace std;
typedef vector<long long int> vi;
typedef pair<ll, ll> pi;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_se... | ALGO | 0.999945 | 3.535178 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2019-02-20T11:01: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": "d12406e9d... |
05bfc0d8-ae8e-47eb-9ea9-cb6751f98cbc | brunosfreitas/CG-UFSC | Matriz.h | #ifndef MATRIZ_H
#define MATRIZ_H
class MatrizNuclear {
public:
MatrizNuclear(int linhas, int colunas);
MatrizNuclear(const MatrizNuclear& outra);
virtual ~MatrizNuclear();
void operator=(const MatrizNuclear& outra);
MatrizNuclear& operator*=(const MatrizNuclear& outra);
MatrizNuclear operator*... | TOOL | 0.930323 | 4.250121 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2014-03-26T18:17:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0ad572d27c... |
8d5f43f7-4cca-4020-a820-9590edfe9f29 | ishandutta2007/codeforces-s | somuchdrama/normal/496/A.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <queue>
#include <cstdio>
#include <fstream>
#include <cmath>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
#define pb push_back
#define vc vector
// -
//ifstream IN(".in");
... | ALGO | 0.999783 | 3.500715 | {
"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": "9c18cd39b9ae... |
146ba4f2-cfdf-4fb7-b582-ee5c69e0f512 | vegerot12/LeetCodeDailyChallenges | 1036-rotting-oranges/rotting-oranges.cpp | class Solution {
public:
int orangesRotting(vector<vector<int>>& grid) {
int days =0;
int n = grid.size(), m = grid[0].size();
queue<array<int,2>> q;
int offsets[5] = {0,1,0,-1,0}; // neightbour index
int rot = 0, tot =0;
for(int i=0;i<n;i++){
fo... | ALGO | 0.999935 | 5.800431 | {
"github_metadata": {
"branch": "main",
"commit_count": 1104,
"repo_created_at": "2023-09-01T17:39: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": "c1806579c... |
e1a20ef4-a65c-49a5-8e1e-020649735b1e | alexandraback/datacollection | solutions_5709773144064000_1/C++/DavidG/main.cpp | #include <algorithm>
#include <cassert>
#include <cmath>
#include <fstream>
#include <iostream>
#include <limits>
#include <set>
#include <utility>
#include <vector>
using namespace std;
#ifdef DEBUG
#define DBGLOG std::cerr
#else
#define DBGLOG if (0) std::cerr
#endif
double calculate_cookie_clicker_alpha(doub... | ALGO | 0.999049 | 4.477963 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c74bf5792... |
efa47b66-fdce-4628-98f7-3f0a11a36884 | patrickchennn/datum-algorithm | linkedlist/doubly/InsertNodeAtGivenPos.cpp | #include <bits/stdc++.h>
using std::cout;
using std::endl;
using std::vector;
using std::cin;
class Node{
public:
Node *prevNode;
int data;
Node *nextNode;
};
void printLL(Node *head);
void InsertNodeAtTail(Node **headReference,int inputData);
void InsertNodeAtPos(Node **headReference,int inputData,in... | ALGO | 0.999814 | 5.251567 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2022-06-19T11:43: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": "783fd2dcefb... |
0b33742a-bbd7-4ac7-a106-06f51a8a4051 | felzend/projeto-ed2 | ProjetoED2/Main.cpp | #define _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "Arvore.h"
void loadFromDatabase(Arvore** arvore)
{
FILE* file = fopen("./db/BDAlunos10e1v1.txt", "r+");
char separator[] = "|";
char line[200];
char* email = (char*)malloc(sizeof... | TOOL | 0.968226 | 3.788593 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2017-09-14T01:34: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": "fbc4adb493... |
a23ba5d9-be98-4208-8137-7d7c1e86ff14 | YaswanthKumar-S/Test-Repository | DAA/pratice/prims_bing.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n = 5;
vector<vector<int>> graph(n, vector<int>(n, 0));
for(int i=0;i<n;i++) for(int j=0;j<n;j++) cin>>graph[i][j];
vector<int> parent(n, -1);
vector<int> key(n, INT_MAX);
vector<bool> mstSet(n, false);
key[0] = 0;
parent[... | ALGO | 0.999985 | 4.594279 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-12-13T16: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": "9d0dc2b9438... |
5b265205-9125-4cc8-b790-332978108b4e | RinCloud/TrickCatcher | Datasets/TrickyBugs/GenProgs/tc_generated_progs_cpp/p02733/p02733_num0_parsed.cpp | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define endl "\n"
int main()
{
i64 H, W, K;
cin >> H >> W >> K;
vector<string> S(H);
for (i64 i = 0; i < H; i++)
cin >> S[i];
i64 ans = H * W; // Changed (H-1)*(W-1) to H*W to initialize with a larger value
bool cc = false;
for (i64... | ALGO | 0.999756 | 4.063833 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2024-12-15T17:51:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e34d4ba32... |
ba6191ee-4c9e-46f1-9dd4-f3df3733468c | BurningFalls/algorithm-study | Baekjoon_All/(09000~09999)/(09196) 정수 직사각형.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FASTIO cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define ROF(i,a,b) for(int i=(a);i>=(b);i--)
#define pii pair<int, int>
typedef struct _INF {
int H;
int W;
int calc;
} INF;
ve... | ALGO | 0.999387 | 3.607394 | {
"github_metadata": {
"branch": "main",
"commit_count": 3832,
"repo_created_at": "2020-08-04T06:46:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5788eeed... |
27504fb7-ef43-413f-9b0d-d02c4d4fce9d | yukeyi/LeetCode | 871 Minimum Number of Refueling Stops/Minimum Number of Refueling Stops.cpp | class Solution {
public:
int minRefuelStops(int target, int startFuel, vector<vector<int>>& stations) {
if(stations.size() == 0) {
if(startFuel >= target)
return 0;
else
return -1;
}
stations.push_back(vector<int>{target, 0});
... | ALGO | 0.99983 | 5.171399 | {
"github_metadata": {
"branch": "master",
"commit_count": 589,
"repo_created_at": "2018-03-27T04:50:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f294312... |
6e52d36f-071e-47d3-9f58-6299c075474d | Mis-prog/trs_labs | lab_2/task_3.cpp | #include <iostream>
#include <vector>
#include <chrono>
#include <fstream>
#include <iomanip>
#include <math.h>
using namespace std;
double F(double u) {
return u * u * u;
//return 1;
}
double func(double x, double t) {
return ((1. - x) * (1. - x) - x * sin(t) - 2. * t);
}
double k1(double u) {
re... | ALGO | 0.974397 | 4.079082 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2024-05-13T20:16: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": "c63f6a9b2... |
84eac641-e641-49d8-954e-d9931371c0d6 | E869120/kyopro_educational_90 | sol/089-05.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class BIT {
public:
int size_ = 0;
vector<long long> dat;
void init(int sz) {
size_ = sz + 2;
dat.resize(size_ + 2, 0);
}
void add(int pos, long long x) {
pos++;
while (pos <= size_) {
dat[pos] += x;
pos += (pos & -pos... | ALGO | 0.999984 | 5.263157 | {
"github_metadata": {
"branch": "main",
"commit_count": 568,
"repo_created_at": "2021-03-27T13:34:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 825,
"forks": 84,
"issues": 5,
"pull_requests": 2
},
"file_meta": {
"content_id": "f31ac67... |
a5087822-dc83-42ed-98a7-04e070419222 | byam/algorithms | atcoder/problems/abl.cpp | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
// debug
#define printv(v) \
for (auto x : v) { \
cout << x << " "; \
} \
cout << endl;
#define print2d(v, n, m) \
for (int i = 0; i < (n); i++) { \
... | ALGO | 0.999671 | 3.87509 | {
"github_metadata": {
"branch": "master",
"commit_count": 309,
"repo_created_at": "2016-09-21T15:27:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b817bd32... |
e791b857-a564-4bfb-96d0-9de16cde858b | everydaymorning/Algorithm-Practice-with-C-plus-plus | TestProject/TestProject/3190_2.cpp | #include <bits/stdc++.h>
using namespace std;
int MAP[101][101];
int n, k, L;
int CNT, idx, dir, x, y;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { 1,0,-1,0 };
vector<pair<int, char>> v;
deque<pair<int, int>> dq;
void INPUT() {
cin >> n;
cin >> k;
for (int i = 0; i < k; i++) {
int x, y;
cin >> x >> y;
x--; y--;
... | ALGO | 0.999778 | 4.214679 | {
"github_metadata": {
"branch": "master",
"commit_count": 178,
"repo_created_at": "2019-09-23T04:08: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": "f6ddaa36... |
18db3ea9-bd14-4689-9f00-0c40782556e0 | misakawu/work--all | 实验九/实验九.cpp | #include<iostream>
#include<queue>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<fstream>
#include <windows.h>
using namespace std;
#define FOR(a,x,y) for(int a=x;a<=y;a++)
#define debug(a) cout<<#a<<": "<<a;
vector<vector<pair<int,int>>> product(11,vector<pair<int,int>>());
int W ; int n;
bool qw... | ALGO | 0.999915 | 3.120494 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-02-26T11:22:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c64a5bc8df... |
650b0c57-28e8-4cbf-8d3e-16a66c09401d | Asaakii/SWUST | OJ源码/530Parallelepiped walk.cpp | #include <iostream>
#include <math.h>
#include <stdio.h>
#include <algorithm>
using namespace std;
const int maxint = 0x7FFFFFFF;
int ans;
void walk(int i, int j, int x0, int y0, int x, int y, int z, int l, int w, int h)
{
if (z == 0)
ans = min((x0 - x) * (x0 - x) + (y0 - y) * (y0 - y), ans);
else
... | ALGO | 0.999509 | 3.676586 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-07-23T16:23:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b58c2b6a21... |
d9305ce4-5d29-48d0-a75f-f6627b299f62 | frozenmaple/Codes_C_CPP | test_temp6.cpp | /*
** test_temp6.c for 字符串查找替换 in c:\Users\froze\Documents\C Codes
**
** Made by frozenmaple
** Login <frozenmaple>
**
** Started on Sat Oct 12 上午9:37:58 2019 frozenmaple
** Last update Sat Oct 12 上午9:37:58 2019 frozenmaple
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define n 100
//计算模式串patt_str... | ALGO | 0.942864 | 3.700136 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2022-11-15T02:55: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": "78f70338a... |
df6c02e6-193c-4f73-b7e9-452970ee5260 | harshsah/Algorithms-Laboratory-CS29003-Spring-2021 | Assignments/week1/17EE10014_1.cpp | /*
Name: <NAME>
Roll Number: 17EE10014
Assignment Number: 1 (12 January 2021)
*/
#include <iostream>
#include <iomanip> // for setprecision()
#include <math.h> // for sqrt()
#include <time.h> // for clock_t, clock(), CLOCKS_PER_SEC
using namespace std;
double compute_iterative(int);
double compute_recursive(int... | ALGO | 0.999825 | 4.615961 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-04-14T02:49: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": "323f13c8a85b... |
7f5453ec-a1ec-4428-b57f-c87119d9865a | mnaveenkumar2009/Competitive-Programming | Codechef/GW19MOS/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define N 100006
int sz[N], maxi[N], par[N], n;
vector <int> adj[N];
int dfs(int node, int p){
par[node] = p;
sz[node] = 1;
for(auto child:adj[node]){
if(child != p)
sz[node] += dfs(child, node);
}
maxi[node] = n - sz[node];
return sz[node];
}
int main(){
io... | ALGO | 0.999994 | 4.295361 | {
"github_metadata": {
"branch": "master",
"commit_count": 120,
"repo_created_at": "2017-08-05T15:52:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d205426... |
dca1f9c9-b44b-491c-adbc-1bcfb82ada28 | h11322689/mesa | src/compiler/glsl/opt_tree_grafting.cpp | /*
* Copyright © 2010 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, mod... | ALGO | 0.998795 | 7.083169 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-06-28T03:22:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a7074b89d43a... |
19c1bf70-123d-4881-af01-84b97c903da1 | arnav-sengar/LearningtoCode | C++/999_Challenge006.cpp | /*
This challenge is about using a collection (list) of integers and allowing the user
to select options from a menu to perform operations on the list.
Your program should display a menu options to the user as follows:
P - Print numbers
A - Add a number
M - Display mean of the numb... | TOOL | 0.991045 | 5.026669 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2024-11-23T14:46:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "44e59b53798... |
bab00790-e73a-4664-ab33-1472ff7efd2b | twerdster/iPTAM | xPTAMclean/iTooN/QR_Lapack.h | #ifndef TOON_INCLUDE_QR_LAPACK_H
#define TOON_INCLUDE_QR_LAPACK_H
#include "TooN.h"
#include "lapack.h"
#include <utility>
namespace TooN{
/**
Performs %QR decomposition.
@warning this will only work if the number of columns is greater than
the number of rows!
The QR decomposition operates on a matrix A. It can ... | ALGO | 0.968648 | 5.414366 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2010-09-28T21:22:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 86,
"forks": 36,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "079f0aa9... |
132ff10c-78b3-4e79-9ab7-d6a102658e77 | IdoMangadi/SP2-A4-Tree | Demo.cpp | // ID: 315310250
// EMAIL: <EMAIL>
// GMAIL: <EMAIL>
#include <iostream>
#include <string>
#include <memory>
#include <vector>
#include <sstream>
#include "Tree.hpp"
#include "Complex.hpp"
using namespace std;
using namespace myTree;
using namespace myComplex;
int main(){
// creating a binary tree of integers:... | ALGO | 0.98848 | 5.342413 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-07-03T16:04: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": "daa221cfe34... |
b47ef69f-727b-4510-bd9c-2b421023d399 | naimhasan2711/UVa | UVa 10013-super long sum.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int i,j,k,carry,n,m,r,r1;
int a[10000],b[10000],c[10000];
while(scanf("%d",&n)==1)
{
while(n--)
{
printf("\n");
scanf("%d",&m);
for(i=1;i<=m;i++){
cin>>a[i];
cin>>b[i];
}
... | ALGO | 0.999975 | 3.38859 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-06-01T16:12: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": "922aba951d... |
a383efe6-8efd-4042-9718-f250303ad93c | riba2534/My_ACM_Code | luogu/P3567.cpp | // luogu-judger-enable-o2
#include <cstdio>
#include <cstring>
#include <cctype>
#include <stdlib.h>
#include <string>
#include <map>
#include <iostream>
#include <sstream>
#include <set>
#include <stack>
#include <cmath>
#include <queue>
#include <vector>
#include <algorithm>
#include <list>
using namespace std;
#defi... | ALGO | 0.999989 | 4.426261 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2018-07-25T17:15:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6102ba21b... |
50bb1736-9e23-4297-aa02-14f65e7f6b82 | Prabhu260902/leetcode | Tree Transformation - GFG/tree-transformation.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 solve(int N, vector<int> p){
// code here
if(N < 4) return 0;
vector<int>v(N,0);
int k = 0;
... | ALGO | 0.999811 | 5.475523 | {
"github_metadata": {
"branch": "main",
"commit_count": 1338,
"repo_created_at": "2022-07-29T05:17:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a8a794c0f... |
14bbdbb7-3595-4892-8b52-580e77d6c0f9 | RahaneSayali/365-days-challenge | Day164/131. Palindrome Partitioning.cpp | class Solution {
public:
vector<vector<string>> partition(string s) {
vector<vector<string>> result;
vector<string> path;
backtrack(s, 0, path, result);
return result;
}
private:
void backtrack(const string& s, int start, vector<string>& path, vector<vector<string>>& result)... | ALGO | 0.999977 | 7.156208 | {
"github_metadata": {
"branch": "main",
"commit_count": 391,
"repo_created_at": "2023-12-11T05:17:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5abfc9bbb7... |
85620632-7c36-4267-8ef7-c5563063db91 | Sgm27/Template | dp_ditgit_LUCIFER.cpp | #include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=a;i<=b;i++)
#define FOD(i,a,b) for (int i=a;i>=b;i--)
#define TIME "Time elapsed : "<<(double)clock()/1000<<" s"
#define int long long
#define pii pair<int,int>
const int MOD=1e9+7,INF=9e18,N=90;
#define maxn
int a[15],nt[N+9];
map<pii,int> dp;... | ALGO | 0.999337 | 4.62734 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-20T00:15:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7799bfd84845... |
3714b778-d952-4c36-a0e7-d0c23a802726 | Jaku245/SEVA | Cieser.cpp | #include <iostream>
#include <string.h>
using namespace std;
string ciphered(int key, string msg)
{
char ch;
for (int i = 0; msg[i] != '\0'; ++i)
{
ch = msg[i];
//encrypt for lowercase letter
if (ch >= 'a' && ch <= 'z')
{
ch = ch + key;
if (ch > 'z')
{
ch = ch - 'z' + 'a' - 1;
}
msg[i] =... | ALGO | 0.999943 | 4.369739 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-09-03T11:55: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": "d425f494ed... |
a662e901-b107-46dc-9a6f-3af485a9d7a3 | JimmyWang0417/Algorithm-Competitive-Codes | 洛谷/P7073 [CSP-J2020] 表达式.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
char str[N];
int n, a[N];
struct node
{
bool flag;
int val;
node(bool _flag = false, int _val = 0) : flag(_flag), val(_val) {}
} p[N];
int st[N], top;
int lc[N], rc[N];
int id[N];
int fa[N];
int g[N];
inline int calc(int u)
{
int &val ... | ALGO | 0.999826 | 4.392071 | {
"github_metadata": {
"branch": "master",
"commit_count": 106,
"repo_created_at": "2019-08-30T06:36:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "716519fc... |
c31afbef-9541-4ef5-83ad-beff44aabdcd | RoadoneP/Algorithm | Baekjoon/1309 동물원 (DP).cpp | #include<bits/stdc++.h>
#define endl '\n'
#define ll long long
#define MAX 100001
#define INF 987654321
#define MOD 9901
using namespace std;
int n,ans;
int dp[MAX][3];
void solve() {
for (int i = 2; i <= n; i++) {
dp[i][0] = (dp[i - 1][0] + dp[i - 1][1] + dp[i - 1][2]) % MOD;
dp[i][1] = (dp[i - ... | ALGO | 0.999983 | 3.680587 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2020-12-31T20:31:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "98fd9f1d4c6... |
30a618c5-53a1-4048-8436-c010e4db3755 | leonail1/2048 | class-TransposeMove.h | // 转置矩阵派生类,以转置矩阵作为核心算法
// class-TransposeMove.h
// 2048
//
// Created by 木林 on 2022/11/17.
//
#ifndef class_TransposeMove_h
#define class_TransposeMove_h
#include"Parameter.h"
#include"class-fundamental.h"
class TransposeMove final: public Fundamental{
public:
void Move(int direction,int position);//根据用户输入进行移... | ALGO | 0.999069 | 3.550803 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-11-20T03:18: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": "8803dac33b11... |
868b3cfd-4371-4154-abcb-404aa70fc058 | zhangxaochen/peac | cpp/plane_fitter.cpp | //
// Copyright 2014 Mitsubishi Electric Research Laboratories All
// Rights Reserved.
//
// Permission to use, copy and modify this software and its
// documentation without fee for educational, research and non-profit
// purposes, is hereby granted, provided that the above copyright
// notice, this paragraph, and the... | ALGO | 0.953256 | 3.041971 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2016-09-11T16:19:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1fc49c3903... |
5e3c4e5b-97d7-4aad-8254-e181e132d912 | backupaccount0/leetcode_practice_personal | 51.n-queens.cpp | /*
* @lc app=leetcode id=51 lang=cpp
*
* [51] N-Queens
*
* https://leetcode.com/problems/n-queens/description/
*
* algorithms
* Hard (63.26%)
* Likes: 9436
* Dislikes: 209
* Total Accepted: 517.4K
* Total Submissions: 809.8K
* Testcase Example: '4'
*
* The n-queens puzzle is the problem of placing... | ALGO | 0.999923 | 7.288568 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2023-01-27T03:34: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": "e54a4e1917... |
084996b4-dd79-4dbb-b23f-551959b25183 | timocafe/strassen | algo/classic.h | // Strassen matrix multiplication implementation.
// Copyright (c) 2021 <NAME>
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include "memory/tile_matrix.h"
#inc... | ALGO | 0.999803 | 7.07131 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2021-01-05T21:17:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f5ec0f22e26... |
418c32b2-a234-482a-944f-bbdfd33f8eeb | NguyenVietHoang725/C-Programing-Language-Learning | PRACTICES/Final_Test_Part_1/Cau1.cpp | #include <stdio.h>
#include <math.h>
typedef struct {
float x, y;
} Diem;
int main() {
int n;
do {
printf("Nhap so luong diem: ");
scanf("%d", &n);
if (n <= 0) {
printf("Gia tri nhap vao khong hop le. Vui long nhap lai!\n");
}
} while(n <= 0);
Diem a[100];
printf("\nNhap lan luot toa do cua %d diem... | ALGO | 0.9887 | 3.55334 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2024-11-14T06:36: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": "e00f7f39807... |
b29ebca3-6d33-4f93-9c66-596164a67b11 | ishandutta2007/codeforces-c | cldp/normal/817/A.cpp | #include <iostream>
#include <vector>
#include <cmath>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAXN = 1010;
const int INF = 1000000007;
const double PI = acos(-1.0);
int main() {
ios_base::sync_with_stdio(false);
int a, b, c, d, x, y;
cin >> a >> b >> c >> d >> x >> y;
... | ALGO | 0.999919 | 3.582409 | {
"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": "5e88a200a249... |
c493240a-f5ff-4c28-8512-ae2a8116206c | abeccaro/project-euler | src/problems/151-200/165/problem165.cpp | //
// Created by <NAME> on 29/04/2023.
//
#include "fraction.hpp"
#include "geometry/point.hpp"
#include "problem165.hpp"
#include "unordered_set"
using fractions::fraction;
using std::unordered_set;
using std::vector;
using point = geometry::point<fraction<int32_t>>;
using segment = geometry::segment<int32_t>;
na... | ALGO | 0.997152 | 5.683213 | {
"github_metadata": {
"branch": "master",
"commit_count": 253,
"repo_created_at": "2017-12-11T06:47: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": "f0d67d00... |
cd06a7a5-80ee-419c-a152-41321fb0e513 | hailey-warner/CSE310 | PJ1/list_write.cpp | //<NAME>
//ID: 1218372181
#include "list_write.h"
#include <stdlib.h>
#include <cstdio>
void listInsert(TAG_LIST *list, double given_key){
NODE *new_node = (NODE *) calloc(1, sizeof(NODE));
// set the key field of new node to the value of <KEY>
new_node->key = given_key;
// insert new node at head... | ALGO | 0.99746 | 3.35355 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-06-15T00:47: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": "7a60e739ef78... |
ac23706d-09cd-462e-94e6-029f27e33dea | ayres1983/testrobotinterview | interview/StringProcessor/StringProcessor.cpp | // StringGenerator.cpp : Defines the entry point for the console application.
//
#ifdef _MSC_VER
#include <windows.h>
#endif
#include <cstdlib>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <cctype>
#include <boost/bind.hpp>
#include "boost/lexical_cast.hpp"
#include <boost/shared_ptr.hpp>
#includ... | TOOL | 0.902554 | 4.148865 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-06-29T17:15: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": "ac2cae8e31... |
5b8e072f-d5c3-4738-8b7e-76608eff6da1 | Firas-Kiram/Competitive-programming-Solutions | Gready/D1. Set To Max (Easy Version).cpp | #include <bits/stdc++.h>
using namespace std;
#define all(c) begin(c),end(c)
#define ssize(c) (int)c.size()
#define pb push_back
using ll = long long;
using ld = long double;
using vll = vector<ll>;
void dbg_out() { cerr << endl; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
cerr ... | ALGO | 0.999998 | 4.116357 | {
"github_metadata": {
"branch": "main",
"commit_count": 188,
"repo_created_at": "2023-10-17T16:59:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "71d603dec7... |
96bd9f58-c5ea-4451-bb45-b34a4b85705f | PoeLoren/Leetcode | Sort List.cpp | class Solution {
public:
ListNode *sortList(ListNode *head) {
if(head == NULL || head->next == NULL)
return head;
return mergeSort(head);
}
ListNode* mergeSort(ListNode* head){
if(head == NULL || head->next == NULL)
return head;
ListNode* fast = h... | ALGO | 0.999987 | 5.622393 | {
"github_metadata": {
"branch": "master",
"commit_count": 271,
"repo_created_at": "2014-10-16T07:40:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "69becde0... |
d823c0e1-1179-49a4-9a7d-3c24155d58ae | doeeon/Baekjoon | 백준/Gold/9019. DSLR/DSLR.cc | #include <iostream>
#include <vector>
#include <queue>
#include <string>
using namespace std;
int L_Shift(int A)
{
int d[4];
for (int i = 0; i < 4; i++)
{
d[3 - i] = A % 10;
A /= 10;
}
return ((d[1] * 10 + d[2]) * 10 + d[3]) * 10 + d[0];
}
int R_Shift(int A)
{
int d[4];
for (int i = 0; i < 4; i++)
{
d... | ALGO | 0.999973 | 5.33946 | {
"github_metadata": {
"branch": "main",
"commit_count": 149,
"repo_created_at": "2025-05-26T05:53: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": "48e79acf03... |
a9454feb-9ace-4142-beda-d11d1130c468 | Zeph-T/Interview-Prep | Recursion/minimum_cost_for_tickets.cpp |
/*
Approach 1 : Using Recursion and memoization
Time Complexity : O(W) W = 365;
Space Complexity ; O(N)
*/
class Solution {
public:
int dp[366];
bool willTravelToday(int day , vector<int>days){
int left = 0;
int right = days.size() - 1;
while(left <= right){
int mid = ... | ALGO | 0.999806 | 5.375252 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2021-11-09T07:48:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "172b3e71e... |
28b212df-d6fc-4639-9e9e-eb201af8958d | arash16/prayers | UVA/vol-107/10717.cpp | /*
>>~~ UVa Online Judge ACM Problem Solution ~~<<
ID: 10717
Name: Mint
Problem: https://onlinejudge.org/external/107/10717.pdf
Language: C++
Author: <NAME>
Email: <EMAIL>
*/
#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
return b == 0 ? a : gcd(b, a % b); ... | ALGO | 0.999897 | 3.815926 | {
"github_metadata": {
"branch": "master",
"commit_count": 386,
"repo_created_at": "2017-04-27T11:21:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "017f2420... |
fa69bdc5-9b78-4c44-bfc1-ed786601f924 | ashwanisharma3/LeetCodeSolutions | 1447. Simplified Fractions.cpp | #
/*
Link: https://leetcode.com/problems/simplified-fractions/
Given an integer n, return a list of all simplified fractions between 0 and 1 (exclusive) such that the denominator is less-than-or-equal-to n. The fractions can be in any order.
Example 1:
Input: n = 2
Output: ["1/2"]
Explanation: "1/2" is the only u... | ALGO | 0.999836 | 6.525238 | {
"github_metadata": {
"branch": "master",
"commit_count": 63,
"repo_created_at": "2020-03-27T15:02: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": "6de53d8d9... |
5f1dc5de-5fb1-4551-a0cf-a81b476f8c48 | thepluck/CP-Training | Onlinejudges/USACO/262144.cpp |
// Problem : Problem 1. 262144
// Contest : USACO - USACO 2016 US Open Contest, Platinum
// URL : http://www.usaco.org/index.php?page=viewproblem2&cpid=648
// Memory Limit : 256 MB
// Time Limit : 4000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
#de... | ALGO | 0.999978 | 3.784886 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-12-11T09:33:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4175e85b99c3... |
7a889f96-a70c-4f54-9d76-6a826294fbfe | leowrites/ChessByLeo-Remake | src/utility/move_validators/KnightMoveValidator.cpp | //
// Created by <NAME> on 2023-07-29.
//
#include "KnightMoveValidator.h"
namespace Chess
{
bool KnightMoveValidator::validate(Chess::GridPosPtr &start, Chess::GridPosPtr &end, Chess::PlayerRole playerRole,
Chess::Board &board)
{
// knight can go up 2 left 1, up... | ALGO | 0.918292 | 5.891569 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2023-07-12T20:56:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "3fa69c29912... |
cbcc92c2-1ef6-430a-9150-f5454f361a0a | sowrov/algo | 2013/tc/practice/LittleElephantAndIntervalsDiv2/LittleElephantAndIntervalsDiv2.cpp | #include "map"
#include "sstream"
#include "cctype"
#include "stack"
#include "ctime"
#include "vector"
#include "cstring"
#include "functional"
#include "cstdlib"
#include "cassert"
#include "iomanip"
#include "cmath"
#include "fstream"
#include "iostream"
#include "deque"
#include "cstdio"
#include "numeric"
#include... | ALGO | 0.999558 | 3.518815 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2014-03-21T08:10: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": "735035fee... |
3d333393-4989-4119-922a-19853df20215 | thanh-nguyen03/CPP-Code | DSA/CodePTIT/CodePTIT-DSA-Sophomore/DSA07003_KIEM_TRA_BIEU_THUC_SO_HOC.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
const long long mod = 1e9 + 7;
#define faster() ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pb push_back
#define all(x) x.begin(), x.end()
#define vi vector<int>
#define vll vector<ll>
#define tester() int t;... | ALGO | 0.99984 | 4.127478 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2022-02-23T14:43:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "396f6b7e42b... |
971f3e85-be9f-4411-b733-7d9625133a1c | Sumit0673/Aleph | transaction_check_cpp/transaction_check.cpp | #include <stdio.h>
#include <iostream>
#include <assert.h>
#include "circom.hpp"
#include "calcwit.hpp"
void threshold_check_0_create(uint soffset,uint coffset,Circom_CalcWit* ctx,std::string componentName,uint componentFather);
void threshold_check_0_run(uint ctx_index,Circom_CalcWit* ctx);
void ReentrancyGaurd_1_crea... | ALGO | 0.981103 | 4.646218 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2025-03-17T16:15:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d6c11e5c2d7... |
49b12ff8-513f-4404-b3b2-4639836350c0 | aitazhibayeva/ADS-2023 | lab3/k.cpp | // #include <iostream>
// #include <vector>
// using namespace std;
// int minSubarraySum(vector<int>& arr, int k) {
// int n = arr.size();
// int minLen = n + 1;
// int left = 0;
// int currentSum = 0;
// for (int right = 0; right < n; ++right) {
// currentSum += arr[right];
// ... | ALGO | 0.999977 | 5.583858 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2023-10-18T19:22:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "64c77bda7b5... |
ccf48191-5bd4-426c-a53d-43e70b91583e | jhimanshu623/IP-303 | lecture_19/p9.cpp | #include<iostream>
#include<vector>
#include<limits>
using namespace std;
class T
{
public:
float max_val;
float min_val;
string max_str;
string min_str;
T()
{
this->max_str="";
this->min_str="";
this->max_val=numeric_limits<float>... | ALGO | 0.999473 | 4.445393 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2021-01-01T10:09: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": "dbe7e0a0b... |
6cf1e303-f20a-4b3c-be57-a9d5044e6a5b | zjhj0814/object-oriented-programming | oop1/200-11.cpp | #include<iostream>
using namespace std;
int main()
{
int dollar,count100=0,count50=0,count20=0,count10=0,count5=0,count1=0;
do {
cout << "달러 값:";
cin >> dollar;
} while (dollar < 0);
if (dollar / 100 > 0)
{
count100 += (dollar / 100);
dollar = dollar % 100;
cout << "100달러" << count100 << "장 ";
}
if (... | ALGO | 0.99217 | 3.570203 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2022-04-25T07:54:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b2ffd8bdcaf... |
a98fa778-e920-4efc-ab14-4cc5b54f781c | CGAL/cgal | Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d.h | // Copyright (c) 1997 ETH Zurich (Switzerland).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : <NAME>
#ifndef CGAL_MINIBALL_MINIBALL
#define CGAL_MINIBALL_MINIBALL
#include <CG... | ALGO | 0.999685 | 6.900933 | {
"github_metadata": {
"branch": "master",
"commit_count": 113659,
"repo_created_at": "2014-10-01T12:22:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5443,
"forks": 1475,
"issues": 511,
"pull_requests": 136
},
"file_meta": {
"content_id... |
0ca16b54-85e2-426f-93ce-9aedaa335c8f | AMIRIOX/MyLuoguRepo | luogu/P1462.cpp | #include <climits>
#include <cstdio>
#include <iostream>
#include <queue>
#define int long long
using namespace std;
const int inf = LLONG_MAX / 3; // 坑1:需要开long long的inf,我也不知道为什么。
const int limits = 1e11;
const int maxn = 1e4 + 10;
const int maxm = 5e5 + 10;
// 看到最大值的最小值想二分(注意二分对象 费用)
// 单调性:越大的最小值越可能合法
// 检查合法:剩下的条件... | ALGO | 0.999871 | 3.850055 | {
"github_metadata": {
"branch": "master",
"commit_count": 458,
"repo_created_at": "2020-07-11T06:47:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1cc39222... |
f1d5e7ff-8eb3-4d75-bd21-19ef990e81a6 | KevinZhang100/HS-Stuff | Data Structures HS/complexnumbers/main.cpp | /******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby,
C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS
Code, Compile, Run and Debug online from anywhere in world.
*********... | TOOL | 0.962356 | 4.274831 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-09-19T16:32: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": "c1e59b6f23d5... |
855a0d22-f9c4-46a8-ab15-93b31ef4ffac | Shridhar1605/LeetCode-Solutions | Valid_sudoku.cpp | bool isRow(vector<vector<char>> &board, int row, int column, char num){
for (int i=0; i < 9; i++){
if (i == column) continue;
if (board[row][i] == num) return false;
}
return true;
}
bool isColumn(vector<vector<char>> &board, int row, int column, char num){
for (int i=0; i < 9; i++){
... | ALGO | 0.999117 | 6.302254 | {
"github_metadata": {
"branch": "main",
"commit_count": 45,
"repo_created_at": "2024-10-13T21:10: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": "ca8b2376753... |
87f45c33-6e82-4060-8b0f-be51e7507f68 | khalid7487/computerGraphcis | number14.cpp | #include<graphics.h>
#include<conio.h>
#include<stdio.h>
void drawline(int x1,int y1,int x2,int y2)
{
int dx,dy,m,s;
float xi,yi,x,y;
dx = x2 - x1;
dy = y2 - y1;
if (abs(dx) > abs(dy))
s = abs(dx);
else
s = abs(dy);
xi = dx / (float) s;
yi = dy / (float) s;
x = x1... | ALGO | 0.998648 | 3.465828 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2019-07-29T05:10: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": "10869abab... |
f96aa966-a6c6-4246-9479-d026a477997d | suixibing/LinuxNote | bite/pthread/con_pro.cpp | // 使用信号量实现生产者与消费者模型
#include <cstdio>
#include <cstdlib>
#include <pthread.h>
#include <vector>
#include <semaphore.h>
#define MAX_QUEUE 5
class RingQueue
{
public:
RingQueue(int maxq = MAX_QUEUE) :
_array(maxq),
_capacity(maxq),
_pos_write(0),
_pos_read(0)
{
sem_in... | ALGO | 0.998216 | 5.169646 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2019-11-22T14:47: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": "6b8dc44a4... |
055e8666-2aad-48dc-b2cf-4be6ebdcc40e | jojonicho/algorithms | codeforces/codedrills/random/1537D.cpp | #include <bits/stdc++.h>
using namespace std;
using namespace __detail;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define ar array
#define vi vector<int>
#define vvi vector<vector<int>>
#define vll vector<long long>
#define vpii vector<pair<int, int>>
#define all(x) (x).begin(), (x).e... | ALGO | 0.999991 | 4.141932 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2020-06-02T14:26:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "29b511257... |
a86469a6-38d0-4d0b-9a53-0ec84440e0f9 | CAST-Robotics/surena_initial_tests | trajectory_planner/include/trajectory_planner/EKFEstimator.h | #pragma once
#include "eigen3/Eigen/Core"
#include "eigen3/Eigen/Dense"
#include "eigen3/Eigen/Geometry"
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
using namespace Eigen;
class EKFEstimator
{
public:
EKFEstimator();
~EKFEstimator();
v... | ALGO | 0.997693 | 5.965028 | {
"github_metadata": {
"branch": "main",
"commit_count": 185,
"repo_created_at": "2021-10-25T14:25:52.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7a42a8b38fa... |
abe69918-c66c-44ad-a4a3-f59d6e278d26 | swapnil159/My-CP-Submissions | Global_Rounds/3/D.cpp | /* winners never quit and quitters never win.
#swap */
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#pragma GCC optimize ("-O3")
#define mod 1000000007
#define inf 1000000000000000000
#define rk 256
#define pb push_back
#define mp ... | ALGO | 0.999945 | 3.62134 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2019-04-25T12:38: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": "3c631a08e... |
41f699d7-d5fb-4732-a2c5-a9d2021ad598 | spmallick/learnopencv | 3D-Gaussian-Splatting-Code/gsplat/gsplat/cuda/csrc/third_party/glm/test/perf/perf_matrix_div.cpp | #define GLM_FORCE_INLINE
#include <glm/ext/matrix_float4x4.hpp>
#include <glm/ext/matrix_double4x4.hpp>
#include <glm/ext/matrix_transform.hpp>
#include <glm/ext/matrix_relational.hpp>
#include <glm/ext/vector_float4.hpp>
#if GLM_CONFIG_SIMD == GLM_ENABLE
#include <glm/gtc/type_aligned.hpp>
#include <vector>
#include <... | TEST | 0.914004 | 6.180759 | {
"github_metadata": {
"branch": "master",
"commit_count": 2579,
"repo_created_at": "2015-02-17T08:00:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22057,
"forks": 11720,
"issues": 229,
"pull_requests": 48
},
"file_meta": {
"content_id... |
0d18200c-80c9-44d0-b4fb-90cb75c471dc | jatin0959/Data_Structures | temp.cpp | // #include "bits/stdc++.h"
// using namespace std;
// struct Node {
// int data;
// struct Node* left;
// struct Node* right;
// Node(int val) {
// data = val;
// left = NULL;
// right = NULL;
// }
// };
// void printLeafNodes(Node* root) {
// if (root == NULL)
// ... | ALGO | 0.999624 | 5.868652 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-11-22T13:51: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": "0568c6b120a7... |
6368bd1a-b953-4fe0-b6e1-caf869eee4eb | khsieh/security_cs165 | project1.cpp | #include <iostream>
#include <openssl/md5.h>
#include <string>
#include <locale>
#include <cstdlib>
#include <pthread.h>
#include <ctime>
#include "base64.h"
#define NUM_THREADS 10
#define ROUNDS 1000
bool solved = false;
static int num_active_threads = 0;
using namespace std;
struct thread_data {
string pass;
... | ALGO | 0.95134 | 4.2107 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-04-15T11:18: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": "9f725e299a... |
7fd0936c-b803-45b3-8b3d-78207e6df966 | 0xc0000005/graphics_sandbox | graphics_sandbox/Vec.h | #pragma once
#include <cmath>
#include <memory>
#include <iterator>
#include <sstream>
#include <array>
#include "Matrix2.h"
template<
typename T, size_t N,
typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
class Vec
{
public:
Vec() : Vec(0) {}
Vec(const T& x) { data.fill... | TOOL | 0.913207 | 6.623585 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-03-27T09:17: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": "af35a201f... |
8fa7398b-c0e2-423d-81b4-ec96c53cc9c8 | LYJ0126/Overcooked_NJU | overcooked-2022-strategy15/source/astar.cpp | #include <iostream>
#include <framework.h>
#include <algorithm>
#include <cassert>
#include <cstring>
#include <cmath>
#include <queue>
#include <time.h>
static int my_max(int x, int y){
if(x > y)
return x;
return y;
}
class Node
{
public:
int x, y; // 节点所在位置
int F, G, H, E; // G:移动耗费。
// ... | ALGO | 0.999905 | 4.08496 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2024-07-04T08:32:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4a03877... |
475ae2e4-45e4-4a79-b931-8f2d782d1b1d | JangYeHoon/Algorithm | backup/Depth-first_search(DFS)/c++/05_2048(Easy).cpp | // fast campus 강의
// https://www.acmicpc.net/problem/12100
// 2
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int N;
vector<vector<int>> rotate90(vector<vector<int>> b)
{
vector<vector<int>> new_board(N, vector<int>(N, 0));
for (int i = 0; i < N; i++)
for (int j = 0; j < N; j++... | ALGO | 0.999969 | 4.772368 | {
"github_metadata": {
"branch": "master",
"commit_count": 437,
"repo_created_at": "2020-09-30T14:03: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": "34d45c74... |
405534b6-a9f9-47d1-80d3-aa2c827bb16b | ForestClaw/forestclaw | applications/metric/2d/circles/circles.cpp | /*
Copyright (c) 2012-2023 <NAME>, <NAME>, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and th... | ALGO | 0.9983 | 5.628658 | {
"github_metadata": {
"branch": "master",
"commit_count": 7815,
"repo_created_at": "2017-08-02T16:07:41.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 67,
"forks": 25,
"issues": 7,
"pull_requests": 4
},
"file_meta": {
"content_id": "303bb0... |
36c1f9a3-766b-42c7-aacf-d62263403992 | jramirezpr/walnut290J2017 | ABBACA3D/290J_2015/MollifierNd/SmoothPolyPotential3d.h | /*
* SmoothPolyPotential3d.h
*
* Created on: Feb 16, 2014
* Author: anderson
*/
/*
#############################################################################
#
# Copyright 2015 <NAME>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the Lesser GNU General Pub... | ALGO | 0.993989 | 5.521243 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-04-12T18:02: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": "d7fba98b21... |
d992d1d7-a71e-42a9-8260-44f1ac84ce2b | Yosuamuliawan19/algorithm-bank | Past Contests/cici/countdown.cpp | // #include<stdio.h>
// #include <bits/stdc++.h>
// created By <NAME>
#include<iostream>
#include<string>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<cctype>
#include<iomanip>
#include<vector>
#include<map>
#include<deque>
#include<sstream>
#include<climits>
#include<set>
#include<stack>
#include<que... | ALGO | 0.999378 | 3.641965 | {
"github_metadata": {
"branch": "main",
"commit_count": 745,
"repo_created_at": "2021-05-27T16:21:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aaff09f186... |
ff32939c-37c8-467f-938b-f709cb7c8462 | TheoHollender/AoC-2024 | solvers/day22.cpp |
#include <bits/stdc++.h>
#include "lib/stdin.h"
#include "lib/matches.h"
#include "lib/counter.h"
#include "lib/array.h"
#define int long long
#define MULTITEST false
using namespace std;
int prune (int x) {
return x % 16777216;
}
int compute (int x) {
x = prune((x << 6) ^ x);
x = prune((x >> 5) ^ x);
... | ALGO | 0.999845 | 3.588899 | {
"github_metadata": {
"branch": "release",
"commit_count": 6,
"repo_created_at": "2024-12-02T19:01: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": "4277f7a87... |
ecea2f0a-dd5c-4557-beb4-ae402fbe3d8c | sohinir2/BST | BST.h | //
// Created by <NAME> on 5/29/20.
//
#ifndef TREES_BST_H
#define TREES_BST_H
#include <iostream>
#include <vector>
#include <queue>
#include "BSTNode.h"
using namespace std;
namespace trees {
enum Direction {
Left,
Right,
};
template<class T>
class BST {
private:
void tr... | ALGO | 0.999575 | 5.297489 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-06-07T18:36: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": "1d795271e1... |
47b34d54-f05c-46bb-b0af-7f433cbe9d10 | cmeslo/leetcode | solution/212. Word Search II/212_02.cpp | class TrieNode {
public:
vector<TrieNode*> childs;
const string* word;
TrieNode(): childs(26), word(nullptr) {};
~TrieNode() {
for (auto node : childs) delete node;
}
};
class Solution {
public:
vector<string> findWords(vector<vector<char>>& board, vector<string>& words) {
if (b... | ALGO | 0.99998 | 6.307517 | {
"github_metadata": {
"branch": "master",
"commit_count": 3508,
"repo_created_at": "2017-07-08T14:09: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": "dbc8889... |
d9ea8320-2ac5-4918-b2e3-59c89a7177a9 | yeezy-na-izi/my_data_structures | avl_tree/AVL.h | #pragma once
#include <utility>
#include <cstdint>
#include <iostream>
using Key = uint32_t;
using Value = double;
/*!
Имплементация бинарного дерева поиска
*/
class AvlTree{
struct Node {
Node(Key key,
Value value,
Node *parent = nullptr,
Node *left = nullptr,
... | ALGO | 0.989419 | 5.500665 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2023-03-20T21:25:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a0873af6a... |
9213d2e5-abe6-47c3-a42c-63062fc5e303 | antdvid/climate | climate/weno.cpp | /* WENO_5 flux for solving scalar equations*/
/* f(T) = u*Tx + v*Ty */
#include "climate.h"
static double linear_flux(
double wave_speed,
double u)
{
return u;
}
static double linear_dF(
double wave_speed,
double u)
{
return 1.0;
}
WENO_FLUX::WENO_FLUX(Front &front):front(&front)
{
}
void WENO_FLUX::We... | ALGO | 0.999892 | 4.566848 | {
"github_metadata": {
"branch": "master",
"commit_count": 360,
"repo_created_at": "2015-12-20T20:10:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2074a47... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.