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 |
|---|---|---|---|---|---|---|---|
9e4b1844-99a7-4cdb-bdef-22804886e626 | Code-Hauptwache/Cpp_SoSe24_Hoffmann | zaka/worksheet05/task1/dynamicArr.cpp | #include <iostream>
#include <thread>
#include <chrono>
#include <exception>
#include <limits>
using namespace std;
void getarray(double*& arr, int* arraySize);
void printArray(double* arr, int* arraySize);
void printWithPause(const string& str, int pauseDuration = 25);
bool getValidInput(int* input);
int main()
{
... | TOOL | 0.904086 | 4.707574 | {
"github_metadata": {
"branch": "main",
"commit_count": 86,
"repo_created_at": "2024-04-20T22:28:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 15,
"pull_requests": 2
},
"file_meta": {
"content_id": "3b1110ca6bb... |
565fd86c-8efe-4356-b06f-2dc3fd05c8b2 | Tahara256/collision | Source/Implementation/CollisionUtility.cpp | #include <Collider/Implementation/CollisionUtility.h>
#include <LMath.h>
#include <Collider/Segment.h>
#include <Collider/AABB.h>
#include <Collider/OBB.h>
#include <Collider/Collider/Collider.h>
#include <Collider/CollisionShape/CollisionShape.h>
float CollisionUtility::saturate(float value) {
return Mathf::clamp(va... | ALGO | 0.999455 | 6.305406 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2019-11-09T08:18:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f234de1c8... |
b02a10cc-e75c-410d-bb5c-16a85fe7dee7 | EbaKhalil/Gandalf-the-Wizard | Dynamic programming2/Dynamic programming/Dynamic programming.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void process(int& weightOfChest, int& numOfTreasures, vector<pair<int, int>>& treasures) {
cin >> weightOfChest >> numOfTreasures;
treasures.resize( numOfTreasures);
for (auto& treasure : treasures) {
cin >> treasure.first >> treasu... | ALGO | 0.999972 | 4.823502 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-12-18T22:05: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": "e37d68ebfcf7... |
10266f56-3255-4bf4-99cf-d0f6c1f78e37 | harshan2005/leetcode-solutions | 2-add-two-numbers/add-two-numbers.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* addTwoNumbe... | ALGO | 0.99997 | 6.511168 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2025-07-03T09:41: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": "9ba0e13d516... |
b980600c-7312-43ed-bd6b-e121d3e711ea | ishandutta2007/codeforces-t | tfg/normal/1609/C.cpp | #include <iostream>
#include <vector>
#include <chrono>
#include <random>
#include <cassert>
std::mt19937 rng((int) std::chrono::steady_clock::now().time_since_epoch().count());
int main() {
std::ios_base::sync_with_stdio(false); std::cin.tie(NULL);
const int ms = 1001000;
std::vector<bool> isPrime(ms, tr... | ALGO | 0.999816 | 4.070789 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9bc70a36f506... |
d54c5520-cbb2-4c3c-940e-2f049c341c25 | tangjz/Three-Investigators | 2018-04-16/C.cpp | #include<bits/stdc++.h>
using namespace std;
int n;
char str[21];
int L[17][17];
int f[17][1 << 16];
int main(){
scanf("%s", str);
n = strlen(str);
int sta = 0;
for(int i = 0; i < n; ++i)
sta |= (str[i] == '1') << i;
for(int i = 0; i < n; ++i){
L[i][i] = 1 << i;
for(int j ... | ALGO | 0.999982 | 3.330936 | {
"github_metadata": {
"branch": "master",
"commit_count": 138,
"repo_created_at": "2018-03-31T16:08:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "73855f59... |
73760992-3836-4ca3-97ba-c015621b6ad7 | Giatroo/Competitive-Programming | Neps/195.cpp | #include <bits/stdc++.h>
typedef long long int ll;
typedef long double lld;
#define fora(i, n) for(ll i = 0; i < n; i++)
#define forai(i, n) for(ll i = 1; i <= n; i++)
#define ford(i, n) for(ll i = n-1; i >= 0; i--)
#define fordi(i, n) for(ll i = n; i >= 0; i--)
#define f first
#define s second
#define sortvector(v) so... | ALGO | 0.999996 | 4.261759 | {
"github_metadata": {
"branch": "master",
"commit_count": 130,
"repo_created_at": "2019-10-01T16:39:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b2b8a76... |
c335eff6-a5e7-477c-884a-623c2aa5871a | denis-gubar/Leetcode | Counting/3443. Maximum Manhattan Distance After K Changes.cpp | class Solution {
public:
int maxDistance(string s, int k) {
int result = 0;
string const D{ "NESW" };
int N = 0, E = 0, S = 0, W = 0, total = 0;
auto update = [&total, &result, k](int sum)
{
int delta = min(k, total - sum);
int rest = total... | ALGO | 0.999939 | 5.693484 | {
"github_metadata": {
"branch": "master",
"commit_count": 132,
"repo_created_at": "2019-10-28T13:05:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bece8252... |
1baf1a27-614c-45c6-abd6-e58e4dca3ef5 | byebyebryan/leetcode | 77.combinations.cpp | /*
* @lc app=leetcode id=77 lang=cpp
*
* [77] Combinations
*
* https://leetcode.com/problems/combinations/description/
*
* algorithms
* Medium (46.50%)
* Total Accepted: 190.9K
* Total Submissions: 410.3K
* Testcase Example: '4\n2'
*
* Given two integers n and k, return all possible combinations of k n... | ALGO | 0.99997 | 6.43905 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2019-03-28T01:46:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2dcd938bc... |
2b8d2410-b9a3-4e90-8e91-67b514dabd97 | ncautivob/CC4102-T1 | ciaccia-patella.cpp | /** TAREA 1, DISEÑO Y ANÁLISIS DE ALGORITMOS
* <NAME>
* <NAME>
* <NAME>
*
* Método: <NAME>
*/
/** En primer lugar, se incluyen todas las librerías necesarias para la implementación */
#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <cstdlib>
#include <iostream>
#include <limit... | ALGO | 0.999697 | 3.374763 | {
"github_metadata": {
"branch": "main",
"commit_count": 105,
"repo_created_at": "2024-04-30T00:59: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": "df82581433... |
c160e85d-ecfd-4c86-ba36-030782713e72 | JohnRCC/P3Group | errorA.cpp | #include <cmath>
#include <iostream>
#include <stdlib.h>
// #######################################################
// # program allows user to define an acceptable #
// # percentage error for the Analytical solution. #
// # #
// # arg1: Confidence level (0,100) #
// # arg2: Min x ... | ALGO | 0.998514 | 4.439394 | {
"github_metadata": {
"branch": "master",
"commit_count": 273,
"repo_created_at": "2015-01-17T15:00: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": "1fb265e3... |
bc298278-417f-4f20-8fad-8125e723a498 | heeejini/Algorithm | 백준/Gold/1719. 택배/택배.cc | #include <bits/stdc++.h>
#define pii pair<int, int>
#define ll long long
using namespace std;
vector<vector<int>> board;
vector<vector<int>> dist;
int n,m;
void floydWarshall(){
for(int k=1; k<=n; k++){
for(int i=1; i<=n; i++){
for(int j=1; j<=n; j++){
if(board[i][j] > b... | ALGO | 0.999988 | 4.208622 | {
"github_metadata": {
"branch": "main",
"commit_count": 176,
"repo_created_at": "2024-03-22T02:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14f3c444a8... |
b40fbf2b-588d-4a91-878c-2833459c1464 | Dragonfire3900/Multi_Dim_Analysis | OGDF_Mods/src/ogdf/planarlayout/BitonicOrdering.cpp | /** \file
* \brief Implements the class BitonicOrdering...
*
* ... that computes a bitonic st ordering as described by Gronemann
* in Bitonic st-orderings of biconnected planar graphs
*
* \author <NAME>
*
* \par License:
* This file is part of the Open Graph Drawing Framework (OGDF).
*
* \par
* Copyright (C... | ALGO | 0.999151 | 6.78073 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2020-11-08T01:47: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": "cecec626189... |
564b68b7-cf9f-4eb6-8639-e3db8b25e820 | SubodhShil/DSA-Problem-Solving | Competitive Programming/Course/Phase 2/Class 4 - Graph Theory/Practice/Message_Route.cpp | /*
ॐ JAY JAY SRI RAM ॐ
* https://vjudge.net/problem/cses-1667
* Author: <NAME>
ॐ Attachment to Detachment ॐ
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
int n, k, m, a, b, c;
const int N = 1e5 + 7;
vector<int> gr... | ALGO | 0.999981 | 4.443379 | {
"github_metadata": {
"branch": "main",
"commit_count": 433,
"repo_created_at": "2023-03-09T15:45:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "91c4188646... |
13a52c20-e674-4903-b852-e1320d22808d | circinusX1/getic3d | getic/Curve_Class.cpp | // Curve_Class.cpp: implementation of the CCurve_Class class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "z-edmap.h"
#include "Curve_Class.h"
BOOL CCurve_Class::Compute(const vvector<VNT>& inpoints,
int curveOrder,
... | ALGO | 0.999675 | 5.304545 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2020-08-13T18:02:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "137de2e2a... |
57e3ce77-c977-4964-8742-2b8e27b513ae | elmerjfudd/wedge | problems/1260_D/metadata/synthesized_constraints/solutions_0269/generated_tests_034_generated_tests_039/transformed_program.cpp | #include <bits/stdc++.h>
using ll = long long;
const ll maxSize = 200007;
using namespace std;
ll a[maxSize];
unordered_map<ll, set<pair<ll, ll>>> dexToLR;
// Checker for trap density and overlap
void check_trap_density_invariant(const set<pair<ll, ll>>& traps) {
if (traps.size() > 1000) { // Example threshold for... | ALGO | 0.999948 | 5.033362 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2025-05-23T12:21: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": "b5e2af6ca52... |
be927c66-b915-4360-888c-db7798e6e8fb | 04AJ/ga2 | main.cpp | #include <iostream>
#include <fstream>
#include <array>
#include <string>
#include <algorithm>
#include <list>
#include <stack>
#include "ArgumentManager.h"
using namespace std;
bool orderP(string s);
bool validP(string a);
bool doubleP(string a);
int priority(char c);
void print(list<string> valid, list<string> inval... | ALGO | 0.998959 | 4.87554 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2023-03-01T19:31:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc7fb80fa... |
cb3344a9-0576-4248-bd7d-fa5b2b40c53d | BRUTEUdesc/maratonas-de-programacao | Domesticas/2010/2010-1/Pacotes/D/labirinto1.cpp | #include <cstdio>
#include <fstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <cassert>
using namespace std;
typedef vector<int> VI;
typedef queue<int> QI;
typedef pair<int, int> PII;
typedef queue<PII> QPII;
const int MAX = 8;
int mauer[MAX][MAX];
//int pred[MAX][MAX];
char pred[MAX][MAX];
... | ALGO | 0.999909 | 3.553278 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-04-16T21:31:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0934e5c384b... |
9143c267-fa42-4b4d-8c81-caa62feaca50 | bruce1408/Alogrithm_Datastruct | Array/1351_Count_Negative_Numbers_in_a_Sorted_Matrix.cpp | #include <iostream>
#include <vector>
using namespace std;
/**
* 方法 1,暴力遍历数组即可
*/
int countNegatives(vector<vector<int>> &grid)
{
int num = 0;
for (int i = 0; i < grid.size(); i++)
{
for (int j = 0; j < grid[i].size(); j++)
{
if (grid[i][j] < 0)
{
nu... | ALGO | 0.999977 | 5.168373 | {
"github_metadata": {
"branch": "master",
"commit_count": 1617,
"repo_created_at": "2018-04-04T09:28:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "610c705... |
be6de250-e7ea-4407-b9c0-370783cb7d17 | htaozhang/cpp_common | common/http_server.h | // Copyright(c) 2017 macrozhang
// All rights reserved.
//
//
#ifndef __HTTP_SERVER_H__
#define __HTTP_SERVER_H__
#include <iostream>
#include <string>
#include <map>
#include <algorithm>
#include <functional>
#include <cstring>
#include "generic_socket.h"
const char* kCRLF = "\r\n";
class HttpRequest {
public:
... | WEB | 0.934358 | 5.131759 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2017-10-31T02:44: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": "5ba96c96f... |
5d38fbc7-70bc-4d68-b491-cd71e08be60b | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/Mixtral/top0-100/evaluate-the-bracket-pairs-of-a-string-Solution.evaluate/177913_Exec_Code_Overflow.cpp | tt_cmap8_validate( FT_Byte* table,
FT_Validator valid )
{
FT_Byte* p = table + 4;
FT_Byte* is32;
FT_UInt32 length;
FT_UInt32 num_groups;
if ( table + 16 + 8192 > valid->limit )
FT_INVALID_TOO_SHORT;
length = TT_NEXT_ULONG( p );
if ( table + le... | ALGO | 0.958173 | 4.412016 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-03-22T14:39:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "32e42d8e95c0... |
2f483665-e29b-44a1-9ee1-fdb3c4bf77cd | hxzinh/VOI | BUYING/main.cpp | #include <bits/stdc++.h>
#define int long long
#define INF 1e18
#define cntBIT(x) __builtin_popcountll(x)
#define MASK(x) (1LL << (x))
#define BIT(x, i) ((x) >> (i) & 1)
#define FastIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
const int NM = 50;
int n;
int a[NM][5];
int s[NM][5][NM][N... | ALGO | 0.99982 | 3.723031 | {
"github_metadata": {
"branch": "main.cpp",
"commit_count": 2,
"repo_created_at": "2023-04-04T10:59: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": "69ea2ade... |
e43ebd63-9cac-4cf3-bb35-7cb838721874 | lococaeco/AutonomousDrivingStudy | KalmanFilter/잡것/Kalman2.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <eigen3/Eigen/Dense>
#include "matplotlibcpp.h"
namespace plt = matplotlibcpp;
class KalmanFilter {
private:
double x; // 추정된 상태
double P; // 추정된 상태의 공분산
double Q; // 프로세스 노이즈의 분산
double R; // 측정 노이즈의 분산
public:
KalmanFilter... | ALGO | 0.995096 | 6.195321 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-08-29T10:19:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9e5d0630bff... |
020d7999-20f4-47bd-a4de-11ff3daf2b07 | KNOT-FIT-BUT/CPKSemanticEnrichment | figa/sources/figa_cedar.cpp | #include "figa_cedar.h"
/* Name: sortFunc
* Class: none
* Purpose: compare two structures, compares their string parts in
* unsigned char comparision, because of darts-clone
* Parameters: a -first object
* b - second object
* Returns: True if first object i... | TOOL | 0.923346 | 3.7015 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2017-10-12T10:08:15.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0b5502b042... |
9fd8e184-be30-4e75-b25a-8145a374d7bb | ckumar392/project-Start-to-Develop | Study Materials/C++/DSA/ALGORITHMS/SORTING/heap_sort.cpp | #include<iostream>
using namespace std;
//function to divide the array until it has only one element
void merge_sort(int[], int, int);
// function to merge two sorted arrays
void merge(int[], int, int, int);
// global array - to write the final sorted array in this
int na[100];
int main() {
int a[50]; //input a... | ALGO | 0.999972 | 5.265682 | {
"github_metadata": {
"branch": "main",
"commit_count": 2843,
"repo_created_at": "2024-11-06T11:20:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "17ed1c70e... |
8a76b4f8-1360-4f2a-b2fc-f5829e8acf87 | sourabh59-coder/CrackYourPlacement_Arsh_Goyal | 09. Graph/19. Pre-requisite/Approach1.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
bool isPossible(int N,int P, vector<pair<int, int> >& v) {
// Code here
vector<int> adj[N];
int n = v.size();
for(int i=0;i<n;i++)
{
int a = v[i].first;
int b =... | ALGO | 0.999984 | 6.451211 | {
"github_metadata": {
"branch": "main",
"commit_count": 228,
"repo_created_at": "2024-07-14T18:20:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fcbff30f67... |
e64b830e-27bf-4ab4-8615-232395186350 | cipherByte7/Codeforces | Forked!1904A.cpp | #include <iostream>
#include <cmath>
using namespace std;
void solve(){
int a, b, xk, yk, xq, yq, x, y;
cin >> a >> b;
cin >> xk >> yk;
cin >> xq >> yq;
x = abs(xk - xq);
y = abs(yq - yk);
if(a==1 && b==1 && x==2 && y==2){
cout << "1" << endl;
return;
}
//diagonal... | ALGO | 0.999921 | 4.019466 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2025-07-07T09:40: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": "1fe64474abf9... |
9bb58b0c-9d69-41ba-a4fd-8591a00b8bde | ishandutta2007/codeforces-q | qpedop_muxaujlobu4/normal/1312/E.cpp | #include<iostream>
#include<vector>
#include<stack>
#include<cmath>
#include<algorithm>
#include<set>
#include<map>
#include<string>
#include<tuple>
#include<bitset>
#include<queue>
#include<random>
using namespace std;
int gcd(int i, int j) {
if (j == 0)return i;
else return gcd(j, i % j);
}
template<typename ... | ALGO | 0.999919 | 3.463299 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15: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": "721c10df37d1... |
336975e8-c8b9-47f4-8b31-ed8ac9aecbe1 | riveridea/algorithm | coursera_graph/connecting_points/connecting_points.cpp | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
using std::vector;
using namespace std;
//Kruskcal algorithm, edges based
typedef struct Edge
{
double cost;
pair<int, int> line;
} edge;
//union and find algorithm for disjoint sets
int find(vector<int> paren... | ALGO | 0.999849 | 4.355694 | {
"github_metadata": {
"branch": "master",
"commit_count": 401,
"repo_created_at": "2013-03-17T22:52: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": "65232784... |
74ceab06-7af4-48c9-a7e9-742a8e472e39 | sabil62/Floatsat | codes/obc/dependencies/rodos/support/support-programs/timing-display-octave/export-to-octave.cpp |
#include "stdio.h"
#include "stdint.h"
#include "threadtimings.h"
#define NANOSECONDS 1000000000.0
namespace Common {
extern ThreadTiming* threadTimingList[];
}
using namespace Common;
int64_t gcd( int64_t a, int64_t b) {
if ( a == b ) return a;
if ( a < b ) return gcd ( a, b - a );
return gcd ( a - b, ... | TOOL | 0.929549 | 3.940182 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-05-29T14:54:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "52f9152d9d45... |
ae4f0a47-7533-48d5-90ec-d171d48efe53 | kknyapple/Algorithm | 백준/Silver/21736. 헌내기는 친구가 필요해/헌내기는 친구가 필요해.cc | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <tuple>
#include <stack>
#include <set>
using namespace std;
string s;
int n, m;
int ix, iy;
char a[604][604];
bool visited[604][604];
int dy[] = { -1,0,1,0 }, dx[] = { 0,1,0,-1 };
int ans;
void go(int y, int x) {
... | ALGO | 0.999718 | 4.138361 | {
"github_metadata": {
"branch": "main",
"commit_count": 158,
"repo_created_at": "2024-11-15T10:04: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": "dd8d7a46e2... |
a9119fae-3f5b-4049-9767-a819b947247e | trilinos/Trilinos | packages/nox/src-loca/src/LOCA_Pitchfork_MooreSpence_PhippsBordering.H | // @HEADER
// *****************************************************************************
// LOCA: Library of Continuation Algorithms Package
//
// Copyright 2001-2005 NTESS and the LOCA contributors.
// SPDX-License-Identifier: BSD-3-Clause
// **************************************************************... | ALGO | 0.999885 | 7.319056 | {
"github_metadata": {
"branch": "master",
"commit_count": 104031,
"repo_created_at": "2015-11-16T19:39:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1299,
"forks": 593,
"issues": 263,
"pull_requests": 61
},
"file_meta": {
"content_id":... |
0173f10d-5793-420c-83d0-48a63d5a8720 | varshneyanushka/codeforces | 1922B.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void solve() {
int n;
cin >> n;
vector<int> s(n);
for (int i = 0; i < n; ++i) {
cin >> s[i];
}
if(n<3)
{
cout << 0 << endl;
return;
}
... | ALGO | 0.999933 | 5.174327 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-09-08T18:07:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a3101f46c4... |
7d112e6a-ac72-452c-a2bc-956e4475e6f0 | JoaoxVictorMS/Ads_IFSP | Estrutura de Dados II/Exercícios - Slide 8/Qucik Sort/main.cpp | #include <iostream>
// Função para trocar dois elementos no array
void trocar(int& a, int& b) {
int temp = a;
a = b;
b = temp;
}
// Função para particionar o array
int particionar(int arr[], int inicio, int fim) {
int pivo = arr[fim]; // Escolhe o último elemento como pivô
int i = inicio - 1; // ... | ALGO | 0.999942 | 6.342116 | {
"github_metadata": {
"branch": "main",
"commit_count": 78,
"repo_created_at": "2023-08-03T18:50: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": "a53433c282a... |
9ccc39a8-b789-4361-88cf-5827291695c5 | scotttorgeson/raytracer | raytracer/aabb.h | #pragma once
#include "vec3.h"
#include "ray.h"
class aabb
{
public:
aabb() {}
aabb( const vec3& a, const vec3& b ) { minimum = a; maximum = b; }
vec3 min() const { return minimum; }
vec3 max() const { return maximum; }
bool hit( const ray& r, float t_min, float t_max ) const
{
for ( int a = 0; a < 3; a++ )... | TOOL | 0.985703 | 7.055829 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-02-12T04:13: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": "c1682e1ad... |
99188ff9-0fde-4472-99b3-e1986b5a428b | AhmedBaari/c-plus-plus | Week-2/largest-num-inline.cpp | //Write a program to find the largest of the three numbers using inline functions.
#include <iostream>
using namespace std;
// inline int max(int a, int b, int c) {
// return (a > b ? (a > c ? a : c) : (b > c ? b : c));
// }
inline int max(int a, int b, int c) {
if (a > b && a > c) {
return a;
} e... | ALGO | 0.999268 | 4.97744 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2023-03-06T11:34:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d10953d19b1... |
dd2b80df-6257-4eba-b729-cc33665f4241 | BuckeyeSoftware/rex | src/rx/core/math/mod.cpp | #include "rx/core/math/mod.h"
#include "rx/core/math/isnan.h"
namespace Rx::Math {
Float32 mod(Float32 _x, Float32 _y) {
Shape ux{_x};
Shape uy{_y};
auto ex{static_cast<int>(ux.as_u32 >> 23 & 0xff)};
auto ey{static_cast<int>(uy.as_u32 >> 23 & 0xff)};
Uint32 sx = ux.as_u32 & 0x80000000;
Uint32 uxi = ux.a... | ALGO | 0.977063 | 6.330462 | {
"github_metadata": {
"branch": "main",
"commit_count": 1339,
"repo_created_at": "2019-02-17T03:38:52.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 15,
"forks": 0,
"issues": 20,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0c936b3... |
7834b075-e7cb-4d54-922b-f08cef4dc567 | RajeshPerro/Algorithm_Implementation | BST.CPP | #include "iostream"
using namespace std;
class BST
{
int size;
struct node
{
struct node * parent,lc,rc;
int key ;
~node();
node(struct node *p, int k);
}; *root;
void print_helper(struct node *r);
public:
int getize();
bool find(int key);
void insert(int key);
void remove(int key);
void print();
... | ALGO | 0.999468 | 4.47896 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2016-12-19T22:18: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": "442b10af3... |
5ec21ba8-d8da-4adf-a568-b6ac931bc76b | Aecotyle/GIKI-TASKS-2021664 | assign/2021468/assign2/arrayone.cpp | #include <iostream>
#include <string>
using namespace std;
int main()
{
int input, n;
int prime_list[100], even_list[100], odd_list[100];
int prime_index = 0, even_index = 0, odd_index = 0;
int check[] = {0, 0, 0};
int check_index = 0;
bool run = true;
while (run)
{
cout
... | ALGO | 0.995719 | 3.685224 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-06-10T19:51:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c8853b67214... |
f04bb83f-c1b2-4417-83b2-f4efc936e0d4 | openfheorg/openfhe-development | src/pke/examples/inner-product.cpp | //==================================================================================
// BSD 2-Clause License
//
// Copyright (c) 2014-2022, NJIT, Duality Technologies Inc. and other contributors
//
// All rights reserved.
//
// Author TPOC: <EMAIL>
//
// Redistribution and use in source and binary forms, with or withou... | TEST | 0.94546 | 6.357855 | {
"github_metadata": {
"branch": "main",
"commit_count": 677,
"repo_created_at": "2022-03-04T21:18:20.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 944,
"forks": 241,
"issues": 75,
"pull_requests": 8
},
"file_meta": {
"content_id": "9be271... |
141bf352-d982-4437-aa40-447335b86ed1 | hw0603/gAlgorithm | week1/29721/hyxrxn/29721.cpp | #include <iostream>
#include <set>
#include <algorithm>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n, k;
cin >> n >> k;
set<pair<int, int>> v;
int a, b;
for (int i = 0; i < k; i++) {
cin >> a >> b;
v.insert(m... | ALGO | 0.999754 | 3.990797 | {
"github_metadata": {
"branch": "main",
"commit_count": 513,
"repo_created_at": "2024-04-19T10:02:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 6,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "89b525bfda... |
eb5d3ffc-bdb4-4c96-964a-26b4f189f284 | GUIDchen/mindspore | mindspore/ccsrc/plugin/device/cpu/kernel/self_adjoint_eig_cpu_kernel.h | /**
* Copyright 2022 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | ALGO | 0.94877 | 6.340107 | {
"github_metadata": {
"branch": "master",
"commit_count": 62836,
"repo_created_at": "2023-03-08T02:35: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": "f75ca4... |
422102c7-979b-4068-a45d-c92db032dd38 | jbutner/trilinos-1 | packages/moocho/src/ConstrainedOptPack/src/matrices/ConstrainedOptPack_MatrixSymHessianRelaxNonSing.cpp | // @HEADER
// ***********************************************************************
//
// Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
// Copyright (2003) Sandia Corporation
//
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of thi... | ALGO | 0.999326 | 5.922268 | {
"github_metadata": {
"branch": "master",
"commit_count": 48938,
"repo_created_at": "2013-06-10T20:24:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "703871... |
9267a7c5-69b5-4ce8-8aa9-6a746affbfdc | aryankrsingh004/MyFiles | codeforcces/increasing_series.cpp |
#include<bits/stdc++.h>
#include<unordered_map>
#include<vector>
using namespace std;
bool isSafe(pair<int, int> f, pair<int, int> s){
if(s.first == f.first || s.second == f.second) return false;
if(abs(s.first - f.first) == abs(s.second - f.second)) return false;
else return true;
}
... | ALGO | 0.999882 | 4.34583 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2023-07-21T20:56:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2ce3abc0a... |
7c8009e0-a034-4564-9489-dac1ec4400dc | avadella/CS452 | Projects/Project1/mpiproject1_Whack-An-Orc.cpp | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include "mpi.h" // message passing interface
using namespace std;
// New compile and run commands for MPI!
// mpicxx -o blah file.cpp
//-o tells the name of the output file
// mpirun -q -np 32 blah
//-q mode = quiet mo... | ALGO | 0.999497 | 4.105946 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-08-11T22:55: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": "48b123c876a... |
78425f48-ec0f-4d93-a98c-930a5ec2fb5d | sapphire2207/A-Z-DSA--Striver-s-Sheet- | Step 4 Binary Search/BS on Answers/problem1.cpp | // Problem 1:-
// You are given a positive integer n. Your task is to find and return its square root. If ‘n’ is not a perfect square, then return the floor value of ‘sqrt(n)’.
// The question explicitly states that if the given number, n, is not a perfect square, our objective is to find the maximum number, x, such t... | ALGO | 0.999959 | 4.798497 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-01-28T07:33: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": "009d42b9ea32... |
a632cae9-c697-4658-a642-0cdb7130510e | abufarhad/Codeforces-Problems-Solution | 1247C p-binary.cpp | #include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
#define ll long long
#define scl(n) scanf("%lld", &n)
#define scc(c) scanf(" %c", &c);
#define fr(i,n) for (ll i=0;i<n;i++)
#define fr1(i,n) for(ll i=1;i<=n;i++)
#define pfl(x) ... | ALGO | 0.999838 | 3.198615 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2019-02-14T18:54:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 55,
"forks": 32,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5c0bf2... |
10916a58-5620-4fb2-b65f-933183eb65ad | li924579/ACM | 2015暑假集训/DAY-5/L.cpp | //
// Created by CQU_CST_WuErli
// Copyright (c) 2015Äê CQU_CST_WuErli. All rights reserved.
//
#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <string>
#include <time.h>
#include <vector>
#include <list>
#include <map>
#include <queue>
#include... | ALGO | 0.999437 | 4.07998 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2016-07-07T06:13: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": "1321b61f9... |
bfb30085-f07d-448e-81a9-12b3b1784d51 | vanshxgupta/DSA | Linked List/Detect_RemoveLoopLinkedlist.cpp | //Detect and Remove Loop
#include<map>
#include<iostream>
using namespace std;
class Node{
public:
int data;
Node*next;
//constructor
Node(int data){
this->data=data;
this->next=NULL;
}
};
//APPROACH 1:(using map)
// bool detectloop(Node*&head){
// Node*temp=head;... | ALGO | 0.999775 | 4.264599 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2025-01-14T14:10:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3685010b8af... |
e6c9a815-c780-4d39-8876-b7f85a80b04a | lemito/MagicOfTheC | src/stepik/15-stack/15_stack_dyn.cpp | /**
* Стек, но ООП.
* Переделывается в C несложно -
* Stack st;
* Stack* st_ptr = &st;
* И переделать сами функции
*
* Версия на динамическом массиве
*/
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define N 10
// тут тоже на С++ можно использовать template <typename T>
typedef in... | ALGO | 0.939406 | 3.560461 | {
"github_metadata": {
"branch": "main",
"commit_count": 229,
"repo_created_at": "2024-02-29T15:46:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b150cfb0bd... |
51c53f9e-aa8d-4a73-8a24-0e5f33823ca5 | KrahelM/Random-Files | Pair Programming/#4 Pair Programming/pp4d.cpp | /*File: pp4d.cpp
* Author: <NAME> and <NAME>
* This program creates a function for
* cubing a number that is to be called
* in the main function.
*/
// Identifying the libraries and namespaces used in this program
#include <iostream>
using namespace std;
// Declare Functions
double cube (double base);
// Begin Ma... | TOOL | 0.989789 | 5.606615 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-09-22T23:15: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": "0738e39620e4... |
70aa2502-53ff-4a2e-80ce-174fbca130e0 | dboglobal/DBOGLOBAL | NtlLib/Shared/PathEngine-5.10/code/libs/PathEngine_Core/SmallConvexSplit.h | //**********************************************************************
//
// Copyright (c) 2005
// PathEngine
// Lyon, France
//
// All Rights Reserved
//
//**********************************************************************
#ifndef SMALL_CONVEX_SPLIT_INCLUDED
#define SMALL_CONVEX_SPLIT_INCLUDED
#include "libs/M... | ALGO | 0.972443 | 6.866242 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2020-04-24T10:59:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 61,
"forks": 95,
"issues": 6,
"pull_requests": 1
},
"file_meta": {
"content_id": "339472ec... |
57a35115-8786-473f-bc60-1bf258c5b35a | ElcarimQAQ/algorithm | 2024/盒马/3.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 200000005;
int vis[N];
int check(int n){
int N = n;
int cnt= 0;
bool flag1 = false, flag2 = false;
while (n > 0)
{
if(vis[n]){
vis[N] = cnt + vis[n];
return vis[N];
}
if (n % 10 == 6 || n % ... | ALGO | 0.999303 | 4.363763 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2022-03-26T13:18:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c0d52e7b... |
7cbaf1e5-5705-4a55-a4a9-2d68c2c244f0 | kunge98/CPlusPlus_Study | others/study_stage01_002.cpp | #include <iostream>
#include <string>
using namespace std;
// 冒泡排序
// 数组的首地址,数组的长度
void bubble_sort(int *arr, int length){
for (int i = 0; i < length-1; i++)
{
for (int j = 0; j < length-i-1; j++)
{
if (arr[j] > arr[j+1])
{
int temp = arr[j];
... | ALGO | 0.999258 | 3.430543 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-11-11T14:02: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": "a4a276b168... |
1d5c96f0-6f3a-4c55-b6e9-33b98cb138d0 | aswin-saputra/arduino | Final_project/FFT_FOR_TUNER/FFT_FOR_TUNER.ino |
#include "arduinoFFT.h"
arduinoFFT FFT;
// void getData(char pin, int rawSample, int s, char fac);
void getData(char pin, int rawSample);
double getFFT(double vReal[], double vImag[], int s, int fs);
#define CHANNEL A0
#define RAW_SAMPLE 512
#define SAMPLE 128
// #define FACTOR 2
#define FACTOR (RAW_SAMPLE / SAMPLE... | ALGO | 0.963826 | 4.457109 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2023-10-13T15:41: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": "c3d0cdeeea5... |
ebd22d2d-b57e-4e0f-be65-43746f68e074 | ML-UCV/ML-CodeBert-DistinctSolutions | Raw Dataset/dmin/djikstra/test/eb1a471e-d700-4092-b8e7-700c60006a26.cpp | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <vector>
#include <queue>
using namespace std;
class cmp {
public :
bool operator ()( pair < int , double > a , pair < int , double > b ){
return a.second > b.second ;
}
};
vector < pair < int , ... | ALGO | 0.999933 | 3.309022 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-03-06T17:44:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "98615fff28096... |
bc8056e1-afbb-4e4b-9377-0a9ff898ce87 | CU-Assignments/experiment-3-linked-list-saanvibatra37 | AP 3.2.cpp | #include <iostream>
#include <unordered_map>
class Node {
public:
int key;
int value;
Node* prev;
Node* next;
Node(int k, int v) : key(k), value(v), prev(nullptr), next(nullptr) {}
};
class LRUCache {
private:
int capacity;
Node* head;
Node* tail;
std::unordered_map<int, Node*> cache;
void moveToHead(No... | ALGO | 0.999934 | 6.686179 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-02-02T16:22:19.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aeee8253c9e9c... |
f9f7f303-8331-4fd7-ab7d-bedebade95af | KarimovSamir/cpp | Массив сумма в 3 из 1 и 2/Массив сумма в 3 из 1 и 2/СуммаВ3.cpp | #include <iostream>
#include <time.h>
using namespace std;
void main()
{
setlocale(LC_ALL, "rus");
srand(time(NULL));
int a[10]; // Третий массив, в котором будет сумма первого и второго.
int m[10]; // Первый массив.
int n[10]; // Второй массив.
int i;
int j;
int b;
cout << "Даны 2... | ALGO | 0.997839 | 4.016579 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-03-16T15:13: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": "7412e0d0ff... |
bf3e4331-376d-4e6a-87f6-3b4b62de2874 | nyanpasua/leetcode | src/problems/回溯/二维平面的回溯/[130]被围绕的区域.cpp | //给你一个 m x n 的矩阵 board ,由若干字符 'X' 和 'O' ,找到所有被 'X'
//围绕的区域,并将这些区域里所有的 'O' 用 'X' 填充 。
//
//
//
//
// 示例 1:
//
//
//输入:board = [["X","X","X","X"],
// ["X","O","O","X"],
// ["X","X","O","X"],
// ["X","O","X","X"]]
//输出:[["X","X","X","X"],["X","X","X","X"],["X","X","X","X"],["X","O","... | ALGO | 0.998905 | 6.395818 | {
"github_metadata": {
"branch": "master",
"commit_count": 236,
"repo_created_at": "2019-12-30T06:04:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "964e3b5a... |
e7f8b72a-fce9-4ef5-b75a-8bd73f6a853f | Shikhar-S/Analysis-of-Competitive-Codebase | Data/Contest1243/Standings2/29780254_64384880.cpp | #include <bits/stdc++.h>
using namespace std;
bool same(char c, vector<char> a) {
for (char _c : a) {
if (c == _c) return true;
}
return false;
}
void solve() {
int n;
string s, t;
cin >> n >> s >> t;
int first = -1;
int second = -1;
for (int i = 0; i < n; i++) {
i... | ALGO | 0.999992 | 4.990242 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2019-11-22T14:40:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "807eeb109... |
d9438cfc-e8b4-4942-8311-6c1c812eef89 | iviirai/competitive_programming | 167-TheSultansSuccessors.cc | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
using namespace std;
int board[8][8];
int row[8];
int MAX;
int check(int r, int c)
{
int i;
for (i = 0; i < c; i++)
if (row[i] == r || abs(r-row[i]) == abs(c-i))
return 0;
return 1;
}
void backtrack(int c, int ans)
{
int i;... | ALGO | 0.999235 | 4.168248 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-03-18T15:37: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": "612fdc2723... |
abc08039-3aed-4055-81a0-79e77bc5e0b5 | 8evgeny/sublime_tests | 77_Parallel_programming_C++/ch19/fig_19_22.cpp | /*
Copyright (C) 2019 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, modify, merge, publish, distribut... | ALGO | 0.943491 | 6.400706 | {
"github_metadata": {
"branch": "master",
"commit_count": 2153,
"repo_created_at": "2020-05-28T04:00:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "98819f2... |
c219107c-87e9-42cb-b7f3-d9b7c4fcdb5c | melihcgn/Data-Structures---HW3 | Source.cpp | #include <iostream>
#include <string>
#include <list>
#include "BST.h"
#include "HashTable.h"
#include <vector>
#include <sstream>
#include <fstream>
#include <chrono>
#include <thread>
using namespace std;
// IMPORTANT NOTE: When you trying to samples on this code, after write the queired words, please write CTRL+Z an... | ALGO | 0.998289 | 3.568563 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-02-13T16:20: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": "928d5cd8d3... |
2191b2bf-b048-4a94-a327-b10dfd6ff0f9 | harsh-haria/c-plus-plus | arrays/2D_matrix_search.cpp | #include<iostream>
using namespace std;
//here the elemets are in sorted order
//from left to right and top to bottom
//start from first row last column, if key found then return, else if element is less than key move down else move left.
int main()
{
int n,m;
cin>>n>>m;
int key;
cin>>key;
int a[n]... | ALGO | 0.999992 | 3.644625 | {
"github_metadata": {
"branch": "master",
"commit_count": 110,
"repo_created_at": "2022-02-15T11:00: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": "4a48c596... |
25fd4d8e-d1ce-40a7-97dd-4a3364f041f8 | keonwoo98/BOJ_Algorithm | AlgorithmStudy/Class4/1916.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
#define INF 987654321
int N, M;
int dist[1001];
vector<pair<int, int> > v[1001];
void dijkstra(int start) {
priority_queue<pair<int, int>, vector<pair<int, int> >, greater<pair<int, int> > > pq;
pq.push(make_pair(start, 0));
dist[start] =... | ALGO | 0.999967 | 3.952126 | {
"github_metadata": {
"branch": "main",
"commit_count": 103,
"repo_created_at": "2022-03-23T01:06: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": "1ed94cc41e... |
82fc0275-a157-405d-832f-2fa038aae352 | nehcoah/algorithm-template | leetcode/weekly/387/b.cpp | class Solution {
public:
int countSubmatrices(vector<vector<int>>& grid, int k) {
int m = grid.size(), n = grid[0].size();
vector sum(m + 1, vector<int>(n + 1));
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
sum[i + 1][j + 1] = sum[i + 1][j] + sum[i]... | ALGO | 0.99996 | 6.474474 | {
"github_metadata": {
"branch": "main",
"commit_count": 591,
"repo_created_at": "2023-09-11T02:34: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": "cf1dbee73b... |
71fcaec3-2f0a-46b9-8e43-2c5ee0a07668 | karrrtavy/studs | programming/11.03.25/3.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <map>
using namespace std;
int main() {
// лямбда функции
vector<int> v = {1, 3, 5, 2, 4, 1, 5, 7, 4, 9, 3, 4};
int summ = 0;
for_each(
v.begin(),
v.end(),
[](int x){cout << x << ' ';}
... | ALGO | 0.998101 | 4.420662 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2025-04-21T15:20:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f8d7f79f9c... |
016a03cd-4644-45ef-b910-e5f3f75eaf06 | Lkeurentjes/AUTOr3pair | src/Ringr3pair.cpp | // Copyright (c) 2024. made for a proof of concept for thesis: Automatic repair of 3 citymodels by <NAME>
#include "Ringr3pair.h"
#include "Defenitions.h"
#include "Geometrytools.h"
#include "DefenitionsCGAL.h"
#include "Geometrytools_makeCGAL.h"
using json = nlohmann::json;
using namespace std;
namespace AUTOr3pai... | ALGO | 0.99026 | 4.351194 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2024-09-17T15:23:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 12,
"pull_requests": 0
},
"file_meta": {
"content_id": "caf67ebf08... |
4d7d8b91-c524-4d49-ab46-a105a6c53a13 | MatveyBorinskikh/-LABS-PNRPU-IVT-22-1b | Задачи/2-20/2-20.cpp | #include <iostream>
#include <cmath>
int main()
{
setlocale(LC_ALL, "Rus");
float x, n, dlina, s;
bool flag = false;
std::cout << "Введите число n:" << std::endl;
std::cin >> n;
std::cout << "Введите длину последовательности:" << std::endl;
std::cin >> dlina;
std::cout << "Введите эле... | ALGO | 0.996687 | 4.030257 | {
"github_metadata": {
"branch": "main",
"commit_count": 161,
"repo_created_at": "2022-11-01T17:15:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0516eed2c1... |
61cfaed7-fb5c-4110-b896-65c36cb13cc5 | makometr/piaa_9383 | Arutyunyan/lab5/source/task2/bohr.cpp | #include "bohr.h"
#include <cassert>
std::shared_ptr<BohrNode> BohrNode::root = std::make_shared<BohrNode>();
BohrNode::BohrNode(std::weak_ptr<BohrNode> parent, char symbol_to_parent)
: parent(std::move(parent)), symbol_to_parent(symbol_to_parent)
{
}
void BohrNode::AddChild(char arc, std::shared_ptr<BohrNode> ... | ALGO | 0.967337 | 4.430215 | {
"github_metadata": {
"branch": "main",
"commit_count": 354,
"repo_created_at": "2021-03-03T20:28:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 17,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "13ff29558... |
8d69cc8a-56c7-4cbe-ac9d-0fca145127c9 | chrisyjwai/cmpsc121 | workspace/homework/homework004.cpp | #include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
void playMastermind(); // Runs the mastermind sequence.
int rollDie(int); // Picks a random integer >=1 and <= the provided argument.
void evaluate(int,int,int&,int&); // Evaluates the user guess against the combination.
int nthDigit(int,int); ... | ALGO | 0.999027 | 3.682193 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-11-02T00:41: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": "2614063f41... |
cac0e547-b74a-4a60-9176-5144e6179f33 | M-E-U-E/Current | A. Yaroslav and Permutations.cpp | #include<bits/stdc++.h>
#define ll long long
#define endl "\n"
using namespace std;
bool cmp(pair<int,int>a,pair<int,int> b)
{
if(a.first > b.first)
return true;
else if(a.first == b.first and a.second<b.second)
return true;
return false;
}
void solve()
{
ll n;
cin >> n;
ll a[11... | ALGO | 0.999997 | 3.652912 | {
"github_metadata": {
"branch": "main",
"commit_count": 551,
"repo_created_at": "2023-06-27T21:59: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": "8896a796b8... |
03cf7363-615d-4b4f-b350-f8ab50939952 | youngjae-Jo/coding-test | baekjoon/21608.cpp | #include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
int N;
int classroom[21][21]; //1~20, N,N
int student[401][4];
struct pos {
int x = -1;
int y = -1;
int cnt = 0;
int emptyArea = -1;
};
int is_satisfy(int num, int r, int c) {
int count = 0;
//r-1,c-1 / r-1, c / r... | ALGO | 0.99982 | 4.076065 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2023-09-20T15:18: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": "5e02abdb3ce... |
26c953b5-b108-4d03-8ffe-9426dc5026c2 | abhi-p/Leetcode-Practice | 50-Pow(x,n)/pow(x,n).cpp | /*50. Pow(x, n)
Medium
6.1K
6.6K
company
Facebook
company
Amazon
company
Apple
Implement pow(x, n), which calculates x raised to the power n (i.e., xn).
Example 1:
Input: x = 2.00000, n = 10
Output: 1024.00000
Example 2:
Input: x = 2.10000, n = 3
Output: 9.26100
Example 3:
Input: x = 2.00000, n = -2
Output: 0.25... | ALGO | 0.999854 | 5.735469 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-07-08T12:25:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e7be0ceba09a... |
4fd647ce-10ed-4b92-8253-c182d19677c1 | heeseokjung/boj | boj_2994.cpp | #include <cstdio>
#include <vector>
using namespace std;
int T, N;
vector<int> v;
int dp[5001][5001];
int group[5001];
int main() {
int T, N;
scanf("%d %d", &T, &N);
vector<int> v(N+1);
for(int i = 1; i <= N; ++i)
scanf("%d", &v[i]);
dp[0][0] = 1;
for(int i = 1; i <= N; ++i) {
... | ALGO | 0.999998 | 3.21452 | {
"github_metadata": {
"branch": "master",
"commit_count": 484,
"repo_created_at": "2019-03-22T18:34:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2974e1f8... |
30bfadff-a80d-4f7f-9899-3ffb17741ac2 | ErenYeager2004/Data-Structure | Queue/Queue_Using_Stack.cpp | #include<bits/stdc++.h>
using namespace std;
class Queue{
stack<int>st;
public:
Queue(){}
void push(int x){
this->st.push(x);
}
void push2(int x){
stack<int>temp;
while(!this->st.empty()){
temp.push(this->st.top());
... | ALGO | 0.99981 | 4.400778 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2025-02-22T12:56: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": "cbcaff86cf4... |
472db889-c8a5-4b3b-b96d-e591fc755369 | bellday/Baekjoon | 백준/Silver/1463. 1로 만들기/1로 만들기.cc | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
int Input;
int DAT[1000001] = { 0, };
int ans = 2134567890;
struct Info {
int Number;
int Times;
};
void calc(int Num) {
queue<Info> Q;
Q.push({ Num,0 });
while (!Q.empty()) {
Info now = Q.front(); Q.pop();
int N = now.Number;
int ... | ALGO | 0.999981 | 3.745126 | {
"github_metadata": {
"branch": "main",
"commit_count": 302,
"repo_created_at": "2023-04-13T10:08:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae0e95c46f... |
d18175c4-27d8-4c8e-8fc6-2ed41bdfb6b2 | mlpack/mlpack | src/mlpack/methods/amf/update_rules/svd_complete_incremental_learning.hpp | /**
* @file methods/amf/update_rules/svd_complete_incremental_learning.hpp
* @author <NAME>
*
* SVD factorizer used in AMF (Alternating Matrix Factorization).
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of t... | ALGO | 0.90398 | 7.462492 | {
"github_metadata": {
"branch": "master",
"commit_count": 30653,
"repo_created_at": "2014-12-17T18:16:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5396,
"forks": 1663,
"issues": 16,
"pull_requests": 9
},
"file_meta": {
"content_id": "... |
17e9cf27-6b2c-4cc6-90ea-cda4a22253fe | sec-bit/zkPoD-lib | public/mimc3_gadget.h | #pragma once
#include <stdlib.h>
#include <iostream>
#include <libsnark/common/default_types/r1cs_ppzksnark_pp.hpp>
#include <libsnark/gadgetlib1/gadget.hpp>
#include <libsnark/gadgetlib1/gadgets/basic_gadgets.hpp>
#include <libsnark/gadgetlib1/pb_variable.hpp>
#include <libsnark/zk_proof_systems/ppzksnark/r1cs_ppzks... | ALGO | 0.992345 | 5.224109 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2019-06-26T09:21:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 21,
"forks": 5,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "977c9f119... |
73593340-db05-4c19-8cb3-ba5d1f0c1fb7 | MikelBarajas38/Grindset | CSES/2182.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
template<int MOD, int RT> struct mint {
static const int mod = MOD;
static constexpr... | ALGO | 0.999855 | 4.203053 | {
"github_metadata": {
"branch": "main",
"commit_count": 87,
"repo_created_at": "2024-06-19T05:48: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": "87a66b85f7b... |
d872c022-389a-401d-949e-2fe173967b0c | jzhangtx/RottingApples | RottingApples/RottingApples.cpp | // RottingApples.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
#include <queue>
int GetRotDays(std::vector<std::vector<int>>& grid, std::queue<std::pair<size_t, size_t>>& rots)
{
if (rots.size() == 0)
return -1;
std::qu... | ALGO | 0.999366 | 5.470219 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-11-21T16:18: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": "5f5d1f4a29... |
4f3a6903-ee89-4240-ba97-5e49d5e7646d | ishandutta2007/codeforces-e | everule/normal/1450/D.cpp | #include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long int;
template<typename T>
ostream& operator+(ostream& out, const vector<T> &vec){
for(const auto &x : vec){
out<<x<<" ";
}
out<<"\n";
return out;
}
template<typename T>
ostream& operator*... | ALGO | 0.999916 | 3.984912 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:34: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": "f3970f74f6ad... |
6799af2f-daa7-4972-8fc4-c4472a56e213 | suddenly-games/SuddenlyGames | GameEngine/CoreEngine/CoreEngine/src/Minkowski2D.h | #pragma once
#include <vector>
#include "ColliderData.h"
namespace Engine
{
namespace Physics
{
struct Line
{
Vector3 Point1, Point2, Normal;
};
struct ColliderInfo
{
ColliderData* Collider;
int LastHitIndex;
bool Clockwise;
ColliderInfo(ColliderData& collider) : Collider(&collider), Las... | ALGO | 0.980747 | 6.412654 | {
"github_metadata": {
"branch": "develop",
"commit_count": 83,
"repo_created_at": "2021-01-17T11:52:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "37446987d... |
587abddb-75b5-491a-9fc3-433c1ac213a7 | iASL-Gifu/aichallenge2023-integration-final | src/universe/autoware.universe/perception/compare_map_segmentation/src/voxel_based_approximate_compare_map_filter_nodelet.cpp | // Copyright 2020 Tier IV, Inc.
//
// 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 i... | TOOL | 0.909179 | 6.808953 | {
"github_metadata": {
"branch": "main",
"commit_count": 156,
"repo_created_at": "2023-11-03T01:53:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f25c6c25594... |
65eb9a65-c1cd-45dd-82d7-207fdab9d14a | FunctionLab/sleipnir | tools/OntoShell/parser.h | /*****************************************************************************
* This file is provided under the Creative Commons Attribution 3.0 license.
*
* You are free to share, copy, distribute, transmit, or adapt this work
* PROVIDED THAT you attribute the work to the authors listed below.
* For more information,... | TOOL | 0.923504 | 5.625861 | {
"github_metadata": {
"branch": "master",
"commit_count": 931,
"repo_created_at": "2020-01-30T20:12:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0b4ab483e... |
ed969a78-c573-4b62-8ea4-a8c177f302e1 | MOJNICK/shadow | libcomparator/lib/src/clustering.cpp | #include "clustering.hpp"
Clustering::Clustering( std::vector<IndexTransition> const & vIndexTransition, double (*distance_function)(IndexTransitionCluster const &, IndexTransitionCluster const &), double eps, uint minPts):
eps{eps}, minPts{minPts}, nowClusterNumber{0}, distance_function{distance_function}
{
std::... | ALGO | 0.994396 | 5.361521 | {
"github_metadata": {
"branch": "master",
"commit_count": 281,
"repo_created_at": "2017-10-16T04:44:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "57e1e8e3... |
09214834-bac8-4778-b294-8930ecc3c655 | ishandutta2007/codeforces-b | benq/normal/508/C.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
typedef vector<int... | ALGO | 0.999891 | 4.065399 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-11T01:05:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9ae269718b8d... |
90eee615-1fcb-46a2-b50d-f7aadfb98309 | Ra1nWarden/Online-Judges | UVa/11513.cpp | #include <iostream>
#include <map>
#include <vector>
#include <sstream>
#include <queue>
using namespace std;
struct Board {
Board() {};
Board(vector<vector<int> > b) : v(b) {};
vector<vector<int> > v;
bool operator<(const Board& another) const {
for(int i= 0; i < 3; i++) {
for(int j = 0; j < 3; j++... | ALGO | 0.999923 | 4.366961 | {
"github_metadata": {
"branch": "master",
"commit_count": 208,
"repo_created_at": "2014-04-02T05:35:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 38,
"pull_requests": 0
},
"file_meta": {
"content_id": "cb045d8... |
30f8cbf5-12f9-4754-9c17-8e9184de79b0 | Aklant-sahu/Embedded-Programming | pid1/pid1.ino | int temp, counter1 = 0,counter2=0,prev_count1=0,prev_count2=0;
int setpoint1=0,setpoint2=0;
double kp=0,ki=0,kd=0;
float error1=0,val1=0,prev_error1=0,cum_error1=0;
float error2=0,val2=0,prev_error2=0,cum_error2=0;
double curr_time1=0,prev_time1=0,dt1=0,rate1=0;
double curr_time2=0,prev_time2=0,dt2=0,rate2=0;
int inc... | TOOL | 0.976347 | 4.457349 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-08-07T04:47:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "832c5ba9051e... |
3672840e-a114-412e-ba80-e27233e43925 | gky360/contests | atcoder/agc012/d/d.cpp | // AtCoder Grand Contest 012
// D - Colorful Balls
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
const int MAX_N = 200000;
const int MAX_C = MAX_N;
const ll INF = (ll)1e18;
const ll MOD = (ll)1e9 + 7;
ll extgcd(ll a, ll b, ll &x, ll &y... | ALGO | 0.999939 | 4.930358 | {
"github_metadata": {
"branch": "master",
"commit_count": 1196,
"repo_created_at": "2017-12-10T10:00:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e8fc2fd... |
338f43c7-4907-454f-9155-30998661b12f | thucvu2001/c-basic | #19_ThuatToanSapXep/ThuatToanSapXepQuickSort_Lomuto.cpp | #include <bits/stdc++.h>
using namespace std;
int partition(int a[], int l, int r)
{
int pivot = a[r]; // chon chot la phan tu cuoi cung
int i = l - 1;
for (int j = l; j < r; j++) {
if (a[j] <= pivot) {
++i;
swap(a[i], a[j]);
}
}
// dua chot ve giua
++i;
... | ALGO | 0.999926 | 5.074335 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2022-03-25T09:23: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": "f9e8bf820... |
12affd7f-6b77-4ced-8e1f-cd0bec3559bc | kaushalmahi12/DS_ALGO | star_sky.cpp | #include<iostream>
using namespace std;
int f[101][101][11];
int main() {
int n, q, c, x1, y1, x2, y2, t;
cin >> n >> q >> c;
for (int i=1; i<=n; i++) {
cin >> x1 >> y1 >> t;
f[x1][y1][t]++;
}
for(int i=1; i<=100; i++){
for(int j=1; j<=100; j++){
for(int k=0; k<=10... | ALGO | 0.999869 | 3.953539 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-03-27T11:50: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": "2f0531d646... |
d12e97d8-ad14-42fd-91e8-c460d406ea24 | jonaslan/numerikumCpp | sheet10/diff_mpi.cpp | // TODO: Include required libraries, header files, and namespaces
#include<mpi.h>
#include "masterworker.h"
#include<iostream>
#include<fstream>
#include<cmath>
#include "adapt.h"
#include<ctime>
using namespace std;
// TODO: Integrand class goes here! (copied from diffusion.cpp provided by professor)
class Diffusio... | ALGO | 0.999794 | 5.354565 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-09-02T10:36: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": "432d9980fd... |
10bec97f-f315-4ab1-94e5-7a613a17a88a | Timmimim/OOP_for_Scientific_Computation | blatt07/src/lup.h | #ifndef LUP_H
#define LUP_H
#include <cassert>
#include <iostream>
#include <array>
#include "vector.h"
#include "matrix.h"
class LUP{
// decomposition is done in-place, so this matrix contains both L and R;
// lower-left half BELOW diagonal contains L (minus the diagonal being strictly 1s)
// upper-right half... | ALGO | 0.998721 | 5.77005 | {
"github_metadata": {
"branch": "master",
"commit_count": 136,
"repo_created_at": "2020-10-12T15:07:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "17fd52d6... |
42da0148-4920-43b9-af49-d9571bed608b | AlexandriaChemistry/ACT | src/act/ga/sorter.h | /*
* This source file is part of the Alexandria Chemistry Toolkit.
*
* Copyright (C) 2014-2022
*
* Developers:
* <NAME>,
* <NAME>,
* <NAME>,
* <NAME>,
* <NAME> (Project leader)
*
* This program is free software; you can redistribute it and/or
* mo... | ALGO | 0.999427 | 6.59896 | {
"github_metadata": {
"branch": "main",
"commit_count": 21410,
"repo_created_at": "2020-04-08T19:04:09.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 12,
"forks": 0,
"issues": 59,
"pull_requests": 0
},
"file_meta": {
"content_id": "6842cbe... |
ed1b4143-f7cd-45b2-ba42-81653a0c48b4 | ch37n1/sys_alg_lab | lab1/TopologicalSort/topological_sort.cpp | #include <iostream>
#include <vector>
#include "topological_sort.h"
#define FIRST_INDEX 1
#define END_INDEX argc - 1
#define ARRAY_SIZE (argc - 1)
int get_node_index_by_name(std::string name, Graph *g) {
for (unsigned short i = 0; i < g->nodes.size(); i++) {
Node *n = &(g->nodes[i]);
if ( n->nam... | ALGO | 0.99895 | 4.430245 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2020-04-04T06:06: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": "2b78f9e07... |
50ccf65f-ae72-42c3-8895-6e24cc9069ee | mocohen/USER-MCCG | plumed-2.1.1/plumed_build/lib/plumed/src/analysis/Analysis.cpp | /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Copyright (c) 2012-2014 The plumed team
(see the PEOPLE file at the root of the distribution for a list of names)
See http://www.plumed-code.org for more information.
This file is part of plumed, version 2.
plumed is free sof... | TOOL | 0.970783 | 5.913469 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2015-02-20T03:26:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f80da9270... |
7268adcc-037d-4789-ac34-a84940ab3e6c | sachin235/HacktoberFest101 | C++/Interviewbit/Add One to Number.cpp | /*
Given a non-negative number represented as an array of digits,
add 1 to the number ( increment the number represented by the digits ).
The digits are stored such that the most significant digit is at the head of the list.
Example:
If the vector has [1, 4, 3]
the returned vector should be [1, 4, 4]
as 143 + 1 = 144.
... | ALGO | 0.999938 | 5.590465 | {
"github_metadata": {
"branch": "master",
"commit_count": 590,
"repo_created_at": "2019-10-15T16:51:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 26,
"forks": 97,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "7e2866... |
c2622f4c-f63e-4b73-a63c-97a583950a25 | jezberg/maxpre-mallob | src/outputreader.cpp | #include <iostream>
#include <sstream>
#include <vector>
#include <cstdint>
#include "outputreader.hpp"
#include "global.hpp"
using namespace std;
namespace maxPreprocessor {
int OutputReader::readSolution(istream& input, int outputFormat) {
status = 0;
string line;
while (getline(input, line)) {
if (line[0] ==... | ALGO | 0.998194 | 3.86321 | {
"github_metadata": {
"branch": "parsing_interface",
"commit_count": 34,
"repo_created_at": "2024-10-16T20:27:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id":... |
2f1e9d48-1791-4356-8835-9e1306b1b5a6 | AxelMatstoms/pathtracer | src/main.cpp | #include <random>
#include <cmath>
#include "vec.h"
#include "ray.h"
#include "plane.h"
#include "scene.h"
#include "sphere.h"
#include "texture.h"
#include "brdf.h"
#include "mix.h"
#define WIDTH 320
#define HEIGHT 180
#define SAMPLES 512
#define REC_DEPTH 5
#define EXPOSURE 1.0
//#define DBG_PRINT
static std::de... | ALGO | 0.995802 | 5.250797 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-04-23T14:38: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": "e918285487... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.