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 |
|---|---|---|---|---|---|---|---|
735d93c7-e881-4f13-86bf-fb739d422413 | roaa-hany/Huffman-File-Zipper | main.cpp | #include <iostream>
#include <fstream>
#include "FileZipper.h"
using namespace std;
// Function to get the size of a file
// This function opens the file in binary mode and returns its size
long getFileSize(const string& filename) {
ifstream file(filename, ios::binary | ios::ate); // Open file in binary mode and... | TOOL | 0.989136 | 6.364382 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2025-04-27T22:17: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": "14b50fcadeb... |
56847dc0-605e-4ebe-9c05-b2fd1e5ddfff | Hi-LinkDuino/RM56 | foundation/graphic/utils/interfaces/kits/gfx_utils/diagram/common/common_math.h | /*
* Copyright (c) 2022 Huawei Device 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.983905 | 6.248495 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2023-03-10T08:59:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "610c6265ac... |
447e8e1c-02a6-416e-8490-d1cf3a4e3fe8 | usernamegenerator/MOOC | MIT OpenCourseWare/MIT6.096 Introduction to C++/assignment/assignment3/geometry.cc | #include <iostream>
#include <cstdlib>
#include <cmath>
#include "geometry.h"
using namespace std;
int Point::getX() const
{
return x;
}
int Point::getY() const
{
return y;
}
void Point::setX(const int new_x)
{
x = new_x;
}
void Point::setY(const int new_y)
{
y = new_y;
}
PointArray::PointArray(... | TOOL | 0.928775 | 3.751853 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2020-03-08T19:59: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": "90dabece5... |
3e38f0a6-c34b-4931-be25-c187bff31ff6 | kercre123/victor | coretech/vision/robot/perspectivePoseEstimation.cpp | /**
* File: perspectivePoseEstimation.cpp
*
* Author: <NAME>
* Date: 04-02-2014
*
* Description: Embedded implementation of templated methods for the three-point
* perspective pose estimation problem.
*
*
* Copyright: Anki, Inc. 2014
**/
// NOTE:
// Some of the P3P code below was adapated from Laurent K... | ALGO | 0.999681 | 6.79391 | {
"github_metadata": {
"branch": "snowboy",
"commit_count": 38827,
"repo_created_at": "2024-09-10T20:49:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 40,
"forks": 35,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "d1d... |
f1ba660b-099c-4bd1-9247-20fdcded1695 | Kami-code/Basic-Interpreter | expressiontree.h | #ifndef EXPRESSIONTREE_H
#define EXPRESSIONTREE_H
#include<iostream>
#include<cstring>
#include<stack>
#include<queue>
#include<map>
using namespace std;
class tree_node{
public:
string operator_string = "pureValue";
string variable_name = "";
int value_1 = 0;
int value_2 = 0;
int level = 1;
... | ALGO | 0.993181 | 3.57063 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2021-03-10T12:17: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": "85dc07f61... |
194354cb-2901-4f4b-b203-cc77b0881e0b | Stenardt-9002/CODECHEF-Datastructure-and-algo | CODECHEF_DSA/Graph Algo/Connect_NODE_same_level/m1.cpp | #include<iostream>
#include<queue>
using namespace std;
struct Node
{
int data;
struct Node *left,*right;
struct Node *newRight;
};
Node *newNode(int daat)
{
Node *temp = new Node;
temp->data = daat;
temp->left = temp->right = temp->newRight = NULL;
return temp;
}
//explain funckion
/*... | ALGO | 0.999931 | 3.664067 | {
"github_metadata": {
"branch": "master",
"commit_count": 307,
"repo_created_at": "2019-06-03T15: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": "79130e9c... |
8b323333-5d9a-4fd6-a875-018eec51d2e2 | joaomarcosth9/competitive-programming | contests/unbdesc-I/G.cpp | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEBUG
#include "debug.h"
#else
#define debug(...)
#endif
const int maxn = 2e5 + 5;
int arr[maxn];
bool vis[maxn];
vector<int> adj[maxn];
int dfs(int u, int p = -1) {
if (vis[u]) return 0;
vis[u] = 1;
for (int v : adj[u])
if (v != p) {
... | ALGO | 0.999888 | 4.40383 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2022-07-20T11:23:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da1e1aa2753... |
d420fc42-1d88-4d8d-b9d3-ebe3c8c5a1ac | cvetkovic/kdp | KDP_2016_Okt_4.cpp | void person(int id)
{
while (1)
{
int ticket;
// waiting in row to apply for a car
in("person_queue", ?ticket);
out("person_queue", ticket + 1);
in("my_turn", ticket);
int cnt, car_no;
// get car that has been waiting for the longest time
in("p_cnt", ?cnt);
out("p_cnt", cnt);
in("queue", cnt... | ALGO | 0.995341 | 3.485949 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-04-12T22:25: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": "5d218aedce... |
17bd136e-176d-4d54-90c6-71d8fe6176a8 | MitchellSM/Quantum_Circuit_Simulator | src/functions.cpp |
#include "quantum.h"
#include <complex>
#include <numeric>
#include <utility>
using namespace std;
using namespace quantum;
/// Resize a given operator matrix to dimensions n*m
void resize(op &A, int n, int m)
{
A.resize(n);
for (auto &r: A) {
r.resize(m);
r.assign(m, 0);
}
}
/// Perform ... | ALGO | 0.978055 | 4.045618 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-08-07T18:54:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf2dafe749... |
eaefc971-17ae-49f2-85c3-1c5fb03e1c41 | ishandutta2007/codeforces-w | w0nsh/normal/1324/E.cpp | #include <bits/stdc++.h>
#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define REP(i, a, b) for(int i = (a); i < (b); ++i)
#define TRAV(i, a) for(auto & i : (a))
#define SZ(x) ((int)(x).size())
#define PR std::pair
#define MP std::make_pair
#define X first
#define Y second
typedef long long ll;
typedef std::pair<int, ... | ALGO | 0.999827 | 3.881341 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:34:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "09bfb0f5c1d0... |
b5fd541c-d5e5-4cbc-b3c5-bea392bfef4d | Shrutikabansal/LNMIIT_Course_Material | 6th sem/design_lab/16uec028_lab_4/16uec028/qpsk_lab4.cpp | #include <iostream>
using namespace std;
#include <cmath>
#include <fstream>
#include"tmwtypes.h"
#include"stdlib.h"
int main() {
int i,j,k;
int lenout=10;
int index;
int leninp = 10;
int input[10];
creal_T qpsk[5];
for(i=0;i<leninp;i++)
{
input[i]=rand()%2;
}
for(i=0;i<leninp;i++)
... | ALGO | 0.999231 | 3.655003 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-03-03T15:54:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5dba01981c... |
dbe42ee1-0185-470f-8787-28cf39a08584 | Pentan/RaytracingCamp2024 | src/sources/petals/aabb.h | #ifndef PETALS_AABB_H
#define PETALS_AABB_H
#include "types.h"
#include "ray.h"
namespace Petals {
class AABB {
public:
Vector3 min;
Vector3 max;
int dataId;
int subDataId;
AABB();
AABB(const RTFloat minval, const RTFloat maxval);
AABB(const Ve... | ALGO | 0.97407 | 7.092557 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-09-01T18:30:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bdab3aa9afe... |
9f488773-b846-48ec-b152-ba5f8264825a | hohaidang/CPP_Basic2Advance | Learning/Data_Structure_and_Algorithem/HashMap/Source.cpp | #include <iostream>
#include <vector>
#include <list>
using namespace std;
class MyHashMap {
// co tham khao dap an
public:
// map
list<pair<int, int>> *hashMap;
int sizeMap = 10000;
/** Initialize your data structure here. */
MyHashMap() {
hashMap = new list<pair<int, int>>[sizeMa... | ALGO | 0.99867 | 5.320402 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2020-04-03T06:49:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3b23f0c... |
61b56050-44af-4af5-a97d-e5709c995ef7 | mayankmj/Algorithms-DataStructures | B_DIV_MOD.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pi (3.141592653589)
#define mod 1000000007
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define max4(a, b, c, d) max(d... | ALGO | 0.999914 | 3.685439 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2023-02-01T07:45: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": "3a99a911d... |
7e1edb7f-9d5b-489a-963c-6bbc32fc8222 | tanyagupta0201/DSA | Linked List/Circular_Linked_List.cpp | #include <bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node *next;
node(int d)
{
data = d;
next = NULL;
}
};
void Insert_At_Head(node *&head, int data)
{
node *n = new node(data);
node *temp = head;
n->next = head;
if (head != NULL)
{
... | ALGO | 0.999834 | 4.834858 | {
"github_metadata": {
"branch": "main",
"commit_count": 266,
"repo_created_at": "2021-06-19T06:34:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 11,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "21f223eb... |
3524de95-ef25-4a00-85fb-04e27335df77 | catboost/catboost | contrib/libs/cxxsupp/libcxxcuda11/include/__algorithm/pstl_find.h | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | ALGO | 0.987047 | 7.139239 | {
"github_metadata": {
"branch": "master",
"commit_count": 49562,
"repo_created_at": "2017-07-18T05:29:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8472,
"forks": 1231,
"issues": 604,
"pull_requests": 23
},
"file_meta": {
"content_id":... |
c9f31eed-0930-4191-ac21-5cccb77af6f8 | PokerM/OfferRoad | 5_Others/常见面试题目答案汇总/笔试/MyString.cpp | #include <iostream>
#include <cstring>
using namespace std;
/*
c语言字符串处理函数:
1.strcat:字符串拼接
2.stcchr:查找字符char * strchr ( const char *, int );
pch=strchr(str,'s');
while (pch!=NULL)
{
printf ("found at %d\n",pch-str+1);
... | TOOL | 0.960301 | 3.432669 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2019-04-25T02:06:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 101,
"forks": 26,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc0805... |
93244fa8-f2fd-4939-a2f3-76823b8257d7 | keigo-brook/Atcoder | ABC/abc035/C.cpp | // imos法
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <cassert>
#include <cmath>
#define INF (int)1e8
#define EPS 1e-10
#define FOR(i, a, b) for (int i=(a);i<(b);i++)
#define RFOR(i, a, b) for (int i=(b)-1;i>=(a);i--)
#define REP(i, n) for (int i=0... | ALGO | 0.999971 | 3.870783 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-02-08T08:41: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": "4a2902e92... |
e5a90c05-b0b1-470c-9799-dcd5b204718c | Eushk1/Algorithms-and-data-structures | Laba1-S4/include/huffman.hpp | //
// huffman.hpp
// АиСД лаба1 RLE
//
// Created by Егор on 28.03.2025.
//
#ifndef HUFFMAN_H
#define HUFFMAN_H
#include <string>
#include <map>
#include <queue>
#include <vector>
class Huffman {
struct Node {
int freq;
char symbol;
Node* left;
Node* right;
Nod... | ALGO | 0.980673 | 4.593377 | {
"github_metadata": {
"branch": "main",
"commit_count": 103,
"repo_created_at": "2024-10-23T03:55: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": "16d1b0028e... |
149435f0-537e-42eb-be75-7ceb6c14af84 | aviralgoel/outscal-fsgd-21 | Chapter 7 - Assignment 1 - Generic Functions/main.cpp | #include <iostream>
using namespace std;
//template <typename T, typename Y>
//T AddScore(T op1, Y op2) {
//
// op1 = op1 + op2;
// return op1;
//}
template <typename T>
T AddScore(T op1, T op2) {
return op1+op2;
}
int main()
{
int op1, op2;
cout << "Enter you current score (int format) and bonus ... | ALGO | 0.929048 | 4.699143 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2022-05-24T06:14: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": "fb56efcb538... |
f9e998fe-5b7b-46ba-910d-49d2092ce757 | coderxtushar/CodeForces_Solution_CP | journey2051B.cpp | // Monocarp decided to embark on a long hiking journey.
// He decided that on the first day he would walk a
// kilometers, on the second day he would walk b
// kilometers, on the third day he would walk c
// kilometers, on the fourth day, just like on the first, he would walk a
// kilometers, on the fifth day, jus... | ALGO | 0.999985 | 3.842584 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-01-17T07:05:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2fc3925e728... |
65c58b1d-73ff-49e2-86a7-bd74acfde492 | NavdeepKaurRupaul/DSA | STACK AND QUEUE/STACK/stack using linked list.cpp | #include<iostream>
using namespace std;
template <typename T>
class Node {
public :
T data;
Node<T> *next;
Node(T data) {
this -> data = data;
next = NULL;
}
};
template <typename T>
class Stack {
Node<T> *head;
int size; // number of elements prsent in stack
... | ALGO | 0.999011 | 4.045955 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-12-17T10:10: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": "d0b39f1d94f... |
3770b6ed-1fe1-437e-a9dc-5c40ada25b21 | WuyangPeng/ProgrammingBooksCode | C++/算法/数据结构 C++语言描述/include/d_hashf.h | #ifdef __BORLANDC__
// suppress the warning message that functions containing for are not
// expanded inline
#pragma warn -8027
// suppress the warning message about comparing signed and unsigned values
#pragma warn -8012
#endif // __BORLANDC__
#ifndef HASH_FUNCTIONS
#define HASH_FUNCTIONS
#include <string>
#include... | TOOL | 0.935887 | 5.645771 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2022-08-02T03:48:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "94d63dedad9... |
d0311954-208c-4ea6-8bb9-3594b564e7b8 | kassonlab/gmxapi | src/gromacs/nbnxm/pairlist_tuning.h | /*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2017,2019, by the GROMACS development team, led by
* <NAME>, <NAME>, <NAME>, and <NAME>,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* GROMACS... | TOOL | 0.983268 | 5.120569 | {
"github_metadata": {
"branch": "master",
"commit_count": 19315,
"repo_created_at": "2017-05-25T14:05:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 53,
"forks": 13,
"issues": 93,
"pull_requests": 2
},
"file_meta": {
"content_id": "8384... |
ec263cea-4595-479c-b608-243c4f9ae36b | armyants531/baejoon | 백준/Gold/24023. 아기 홍윤/아기 홍윤.cc | #include <iostream>
#define MAX 200000
using namespace std;
int main() {
int A[MAX];
int n, k, i, j, s = 0, e = 0, temp = 0;
bool breaker = false;
cin >> n >> k;
for (i = 0; i < n; i++)
cin >> A[i];
for (i = 0; i < n; i++) {
if (breaker == true) {
s = i; // reset the starting point
t... | ALGO | 0.999978 | 4.144008 | {
"github_metadata": {
"branch": "main",
"commit_count": 833,
"repo_created_at": "2022-10-29T03:26: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": "73ea34450c... |
25ad4798-6b22-425e-9611-be892485d99f | ryokamoi/competitiveprog | aoj/aoj1611.cpp | #include <iostream>
using namespace std;
#define REP(i, n) for(int i=0; i<n; i++)
int n;
int w[400];
int dp[400][400];
// the maximum number of block can be removed
int cnt(int b, int t) {
if (dp[b][t] >= 0) return dp[b][t];
if (abs(w[t]-w[b])<=1 && cnt(b+1, t-1) == t-(b-1)-2) {
return dp[b][t] = t... | ALGO | 0.999887 | 3.69582 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2019-02-09T15:47: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": "26bbd1775... |
7487e3ed-94cf-4e23-bda1-8ecd4139c154 | KyleZhouOfficial/LinkedListPart2 | RedBlackInsert/Main.cpp | #include <cstring>
#include <iostream>
#include <fstream>
#include "Node.h"
using namespace std;
const int RED = 1;
const int BLACK = 0;
void rightRot(Node* curr, Node* & root){
Node* temp = curr->left;
curr->left = temp->right;
if(temp->right->isLeaf != false){
temp->right->parent = curr;
}
... | ALGO | 0.997454 | 4.306648 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2022-01-21T18:56: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": "499978c36be... |
72ce3c03-12f6-4f0f-9a2b-d2b4b24cf7dd | ruchirpatel4952/Prac_exam | function-2-3.cpp | // function-2-3.cpp
#include "function-2-3.h"
// Function to check if an array is a palindrome
bool is_array_palindrome(int integers[], int length) {
if (length <= 0) {
return false;
}
for (int i = 0; i < length / 2; ++i) {
if (integers[i] != integers[length - 1 - i]) {
return f... | ALGO | 0.99879 | 5.885956 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-08-10T03:35: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": "f27756afdfe... |
c3559908-3491-40ef-afe3-cce5a158bc5e | dgcnz/competitive-programming | uva/11235-frequent-values.cpp | /** @file
* @date 2020-12-04
* @url
* https://onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2176
* @tags segment_tree, data_structures
* @status AC
* @score 4
* @difficulty 3
* @editorial no
* @reading_time ... | ALGO | 0.999992 | 5.176154 | {
"github_metadata": {
"branch": "master",
"commit_count": 380,
"repo_created_at": "2020-01-08T16:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "23f5e5f2... |
3f30f6f8-bdf1-493f-a333-cac938239621 | bluedawnstar/algorithm_study | library/tree/treap.h | #pragma once
#include <algorithm>
// Treap (Cartesian tree) = tree + heap
template <typename T>
struct Treap {
struct Node {
Node* parent;
Node* left;
Node* right;
int cnt;
int priority;
T value;
void init() {
parent = left = right = n... | ALGO | 0.998805 | 5.879265 | {
"github_metadata": {
"branch": "master",
"commit_count": 1274,
"repo_created_at": "2016-12-10T02:41:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 58,
"forks": 8,
"issues": 58,
"pull_requests": 0
},
"file_meta": {
"content_id": "a1879... |
7ffe32a8-e859-4e4d-951c-0839cdcae083 | maybehieu/C_Training | ICPC_Training/tempCodeRunnerFile.cpp | #include <bits/stdc++.h>
using namespace std;
int arr[20001], danhdau[20001];
void reset()
{
for (int i = 0; i < 20000; i++)
{
arr[i] = 0;
danhdau[i] = 0;
}
}
int main()
{
int test;
cin >> test;
while (test--)
{
reset();
int n, dem = 0, giong = 0;
cin ... | ALGO | 0.999969 | 3.549888 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-09-04T15:28: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": "3e0062bb59... |
6b53e542-4056-4d62-86ab-3474f9340068 | NVIDIA/DALI | dali/kernels/common/split_shape.h | // Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unl... | DATA | 0.952784 | 7.438723 | {
"github_metadata": {
"branch": "main",
"commit_count": 3924,
"repo_created_at": "2018-06-01T22:18:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5465,
"forks": 643,
"issues": 218,
"pull_requests": 39
},
"file_meta": {
"content_id": "a3... |
3949fe0a-a180-4df0-afb4-436acd5a0223 | JesusMisael21/Estructura-de-datos-y-algoritmos-TAREAS | Act 3.2 - Arbol Heap Implementando una fila priorizada/heap.h | /*
* heap.h
*
* Created on: 20/10/2015
* Author: clase
*/
#ifndef HEAP_H_
#define HEAP_H_
#include <string>
#include <sstream>
#include "exception.h"
#include <iostream>
// creamos la clase Heap
template <class T>
class Heap {
private:
// atributos y metodos auxiliares que no debe acceder el usuario
T *... | ALGO | 0.975293 | 4.244046 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2020-08-25T19:36: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": "983b02791... |
aa7c1b5a-3ed4-4f05-9144-af074aa669b5 | XArchangel1/Striver-SDE-Sheet-DSA | Linked List/palindromelinkedlist.cpp | #include <bits/stdc++.h>
//a contibution
LinkedListNode<int>* reverse(LinkedListNode<int>* head)
{
if(!head)
{
return NULL;
}
LinkedListNode<int>* prev = NULL;
LinkedListNode<int>* post = NULL;
while(head)
{
post = head -> next;
head -> next = prev;
prev = he... | ALGO | 0.999935 | 5.210368 | {
"github_metadata": {
"branch": "main",
"commit_count": 72,
"repo_created_at": "2022-06-30T15:27:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4fb3a04ef31... |
1fdeb994-a69a-406e-8df0-96e34bc819b2 | kimh060612/KimALGO | Desktop/AlgorithmPS/1726.cpp | #include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <tuple>
using namespace std;
int n, m;
int A[101][101];
int visited[101][101][4];
int sx, sy, dir_s;
int ex, ey, dir_e;
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int dir_change[4][2] = {
{3, 2},
{2, 3},
{0, 1},
{1, 0}
... | ALGO | 0.999971 | 4.99226 | {
"github_metadata": {
"branch": "main",
"commit_count": 750,
"repo_created_at": "2020-12-21T02:25: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": "4357648b15... |
130450dd-2296-400f-8c8e-e930d1629d11 | ChoiCube84/baekjoon-solutions | 31628/source.cpp | #include <bits/extc++.h>
using namespace __gnu_pbds;
using namespace std;
using ll = long long int;
using ull = unsigned long long int;
using ld = long double;
using pll = pair<ll, ll>;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
vector<vector<string>> colors(10, vector<string>(10));
... | ALGO | 0.999935 | 3.664722 | {
"github_metadata": {
"branch": "main",
"commit_count": 474,
"repo_created_at": "2023-08-01T15:05: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": "b1c8d9ff9f... |
ba919ed5-1f24-4610-ab40-be096bc6d95e | RKelleyFX/Magic-Castle | MagicCastleOpenSesameV6.ino | /* Magic Castle - Open Sesame Door
modified 15 July 2018
by <NAME>
version 6
Three button input.
Primary relay output
OWL action removed
Modified Door Safety loop location
*/
const byte OPNBTN = 4, CLSBTN = 5, MOMBTN = 3, DOOROPN = 9, DOORCLS = 10, STOP = 6, OWL = 11;
byte doorState = 0, momState = 0;
... | TOOL | 0.963741 | 5.262686 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-06-09T00:28: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": "58bbd35eb4... |
5b593923-dd95-4c54-80c9-a15b96beefae | jgrazew/RouteOptimization | GraphWeighted.cpp | #include "stdafx.h"
#include <iostream>
#include <functional> //for std::greater in the shortestPath() function
#include "GraphWeighted.h"
GraphWeighted::GraphWeighted(int V) : m_V(V)
{
//Create a array for the number of vertex and initially set each head to NULL
m_array = new AdjList[V];
for (int i = 0; i < V; ++i... | ALGO | 0.999404 | 3.856223 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2017-03-31T11:01: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": "463f3472f9... |
6d7d6f7f-e2cf-4803-bbec-ec10bcd26d59 | wjc852456/my_leetcode | leetcode377.cpp | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
// 377 组合总数IV
#define MAX_NUM 100000
int dp[MAX_NUM];
int combinationSum4(int* nums, int numsSize, int target)
{
if (nums == NULL) {
return 0;
}
if (target == 0) {
return 0;
}
memset(dp, 0, MAX_NUM);
dp[0] = 1;
int ne... | ALGO | 0.999887 | 4.929982 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2020-03-15T13: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": "935b7c55e0... |
7f20144d-7bb4-4217-a248-f8a3e69f0385 | Sewerinius/AdventOfCode2017 | 182.cpp | #include <fstream>
#include <iostream>
#include <map>
#include <vector>
#include <queue>
using namespace std;
class Value {
char adress;
long long value;
bool isAdres;
public:
// Value(char adress) : adress(adress), isAdres(true) {}
//
// Value(int value) : value(value), isAdres(false) {}
void ... | ALGO | 0.987215 | 3.530905 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2017-12-05T22:07: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": "7ae9f4205... |
a0c58970-b0ca-4b1c-8d9f-3a3b13dc4e97 | krlinus/exercises | problems/qs.cpp | #include <vector>
#include <iostream>
#include "utils.h"
using namespace std;
inline void swap(vector<int> & arr, int a, int b) {
int t = arr[a]; arr[a] = arr[b]; arr[b] = t;
}
int part(vector<int> &arr, int start, int end) {
if(start >= end - 1) return -1;
int mid = (start + end) / 2;
int pivot = arr[mid];
... | ALGO | 0.999461 | 5.065727 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2016-01-14T04:42:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bd6fcaf9f... |
c9a5b4d5-057a-4db0-ac35-b9cd0fa8929a | cxyfer/OJ | CPE/CPE49/47-UVA118.cpp | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int N = 55;
#define endl '\n'
vector<int> DIR_X = {0, 1, 0, -1};
vector<int> DIR_Y = {1, 0, -1, 0};
map <char, int> DIR_MAP = {{'N', 0}, {'E', 1}, {'S', 2}, {'W', 3}};
string DIR = "NESW";
int main() {
ios::sync_with_stdio(false); cin.tie(n... | ALGO | 0.999958 | 4.389077 | {
"github_metadata": {
"branch": "main",
"commit_count": 439,
"repo_created_at": "2025-01-18T20:29: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": "09631c8c80... |
9030c802-311e-4583-aaa0-a78e713f188e | billafy/DSA-Programs-CPP | 64.PhoneBookDAT.cpp | #include <bits/stdc++.h>
using namespace std;
class PhoneBook
{
private :
vector<pair<int,string>> book;
int capacity;
pair<int,string> dummy;
public :
PhoneBook(int n)
{
capacity = n;
book.resize(capacity);
dummy.first = -1;
dummy.second = "None";
}
void ad... | ALGO | 0.999493 | 4.333629 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-01-03T16:20:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fad93ebb73d1... |
58227d4c-7a48-4934-9b18-1889177431a0 | mikolajed/Algorithms-and-Data-Structures | Trees/Trie.cpp | //
// main.cpp
// Trie 2
//
// Created by <NAME> on 8/15/20.
// Copyright © 2020 <NAME>. All rights reserved.
//
#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
typedef unordered_map<char, int> dict;
class Trie {
private:
vector<dict> T;
vector<bool> E; //contains no... | ALGO | 0.99932 | 5.454962 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-02-15T22:16: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": "a8ce9187da19... |
c2e73ab4-47d0-494b-a0f7-4345d761a401 | pskliff/21-weeks-of-algos | mmnosovskiy/week-2/task-1/main.cpp | #include <iostream>
int** init_array(int n);
void make_spiral_even(int** arr, int n, int offset, int &largest);
void make_spiral_neven(int** arr, int n, int offset, int &largest);
void print_arr(int** arr, int n);
int main()
{
int n;
std::cin >> n;
int** arr = init_array(n);
int i, j, current = n... | ALGO | 0.999721 | 4.155838 | {
"github_metadata": {
"branch": "master",
"commit_count": 264,
"repo_created_at": "2018-03-05T09:14:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eebd2558... |
758f6d3a-dfae-4211-bb1a-2e7cbcb831ef | mttw2820/BaekJoon_cpp | 1000-4999/2688.cpp | //BaekJoon_2688
//줄어들지 않아
/*
* 제한 시간 : 1s
* 정답 비율 : 49.329%
*/
#include <iostream>
using namespace std;
long long upperNum[65][11]; //upperNum[i][j] : j로 끝나는 i자리의 수
int checkLevel[65];
int main() {
int tc, n;
for (int i = 0; i < 10; i++)
upperNum[1][i] = 1;
checkLevel[1] = 1;
scanf("%d", &tc);
while (tc--) {
... | ALGO | 0.998915 | 4.117627 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2021-01-11T11:15: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": "13e55834d0c... |
758e7cd0-accd-45a4-980a-b2203757b47d | rahalnanayakkara/4dof-mearm-robot | robot_angle_mov_pol/robot_angle_mov_pol.ino | /*
Continuously move angle from start to end point
Last Edited - 01/02/2023
*/
#include <math.h>
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>
#define square(x) x*x
#define cube(x) x*x*x
#define I2C_SDA_PIN 21
#define I2C_SCL_PIN 22
#define SERVO_OFFSET 0
#define SERVO_MIN_POS... | ALGO | 0.998372 | 6.410023 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-01-28T09:50:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fbf626049b2... |
566dd079-e94f-4937-bea2-0b857a025586 | rvmaher/C- | rock-paper-scissor.cpp | #include <iostream>
const char choices[3] = {'r', 'p', 's'};
d char getPlayerChoice();
char getComputerChoice();
void checkWinner(char p, char c);
int main()
{
char player, computer;
player = getPlayerChoice();
computer = getComputerChoice();
checkWinner(player, computer);
return 0;
}
char getPlaye... | TOOL | 0.963396 | 4.069058 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-08-15T10:42: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": "43359dad9d32... |
17d89c64-63da-4a36-b9a1-a1ee17ee2372 | raincross7/code-similarity | codes/train_code/problem254/problem254_460.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int N, K; cin >> N >> K;
vector<long long> a(N);
for(int i = 0; i < N; i++){
cin >> a[i];
}
long long ans = 1e18;
for(int i = 0; i <1<<(N - 1); i++){
int cnt = 0;
for(int j=0;j < N-1;j++){
cnt += (i>>j)&1;
... | ALGO | 0.999889 | 4.061746 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05: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": "cbeb172aba5a... |
d84b64ab-99ad-4556-a836-5287a90ee75b | ShafayetB/Coursera | Data-Structures-and-Algorithms-Specialization/Data Structures/Assignments/Week 4/phone book.cpp | #include <iostream>
#include <vector>
#include <string>
#include <map>
using namespace std;
struct Query {
string type, name;
int number;
};
vector<Query> read_queries() {
int n;
cin >> n;
vector<Query> queries(n);
for (int i = 0; i < n; ++i) {
cin >> queries[i].type;
if (quer... | ALGO | 0.999035 | 4.823355 | {
"github_metadata": {
"branch": "master",
"commit_count": 1108,
"repo_created_at": "2020-04-22T10:42:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 28,
"forks": 63,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b54f7... |
26396c7c-7228-4452-a7d0-de474a12f10c | Altu-Bitu-Official/Altu-Bitu-4 | 07_DFS & BFS/필수/2615_v2.cpp | #include <iostream>
using namespace std;
const int SIZE = 19;
int winner = 0, row, col;
int board[SIZE+1][SIZE+1]; // 오목판
/*
* 방향은 우향, 하향, 우상향, 우하향만 고려한다.
* 왼쪽에서 오른쪽으로, 위에서 아래로 탐색하기 때문에 나머지 방향들은 사전에 발견할 수 있기 때문이다.
*/
int dr[4] = {0, 1, -1, 1}, dc[4] = {1, 0, 1, 1};
bool isFirstTravel(int r, int c, int dir, int co... | ALGO | 0.999967 | 4.64148 | {
"github_metadata": {
"branch": "main",
"commit_count": 206,
"repo_created_at": "2023-02-13T11:05:09.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 37,
"issues": 0,
"pull_requests": 64
},
"file_meta": {
"content_id": "9979d3dbe... |
05f4a097-2eb7-4e8c-985a-85a8578678a1 | winds-zzf/study-datastructure | program/数据结构实验1/10022.cpp | #define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define LOVERFLOW -1
#include<stdio.h>
#include<stdlib.h>
typedef int Status;
typedef struct LNode
{
int date; //结点数据域
struct LNode* next; //结点指针域
}LNode, * LinkList;
//线性链表初始化
Status InitList(LinkList L)
{
L = new LNode;
if (!L) exit(LOVERFLOW);
L->... | ALGO | 0.999792 | 3.377954 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2024-03-12T02:29: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": "3f072e077... |
9abfbf2b-7ac2-4d2c-8dfc-4d5c19bd5e54 | iKrikor/Procesos_SJF_RR | Procesos/SJF.h | //
// SJF.h
// Procesos
//
// Created by <NAME> on 10/19/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
#ifndef SJF_h
#define SJF_h
#include <queue>
#include "Process.h"
#include <list>
#include <vector>
#include <fstream>
#include <string>
#include <sstream>
#include <math.h>
class SJF {
std::... | ALGO | 0.998976 | 4.466867 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2015-10-18T21:30: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": "1e47276375... |
a3426cb0-852a-49d6-a6ac-6616cc57b1a2 | MultiThreadRDX/GroundTruthBenchmarks | ring-bench/ubench.cpp | #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include<omp.h>
#include<stdint.h>
#include<atomic>
#include "util.cpp"
#define CACHELINE_SZ (64)
struct SharedData_t{
volatile uint64_t dummy1[CACHELINE_SZ/sizeof(uint64_t)]; // avoid buddy cacheline prefetching
atomic<uint64_t> data[CAC... | ALGO | 0.982617 | 3.922732 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2020-05-31T22:02:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97de661ac5... |
1d3c5c34-4a62-4780-9389-537b4f57f0b6 | VowpalWabbit/vowpal_wabbit | vowpalwabbit/allreduce/src/allreduce_sockets.cc | // Copyright (c) by respective owners including Yahoo!, Microsoft, and
// individual contributors. All rights reserved. Released under a BSD (revised)
// license as described in the file LICENSE.
/*
This implements the allreduce function of MPI. Code primarily by
<NAME> and <NAME>, with help <NAME>.
*/
#include <cer... | ALGO | 0.951871 | 5.106943 | {
"github_metadata": {
"branch": "master",
"commit_count": 10421,
"repo_created_at": "2009-07-31T19:36:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8581,
"forks": 1934,
"issues": 138,
"pull_requests": 5
},
"file_meta": {
"content_id": ... |
e11b9ef9-5cf5-4b02-bced-e512733a6018 | horn-ice/sorcar | z3-4.8.4/src/muz/spacer/spacer_context.cpp | /**
Copyright (c) 2017 Microsoft Corporation and <NAME>
Module Name:
spacer_context.cpp
Abstract:
SPACER predicate transformers and search context.
Author:
<NAME>
<NAME>
Based on muz/pdr/pdr_context.cpp by <NAME> (nbjorner)
Notes:
--*/
#include <sstream>
#include <iomanip>
#include "muz/... | ALGO | 0.996495 | 6.994129 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-07-10T17:29:21.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "484c72040d1... |
d2bf158e-6e59-4b05-bbf1-dbb10f9a082c | ShelbyKS/AiSD_modul3_task1 | src/MatrixGraph.cpp | #include "MatrixGraph.hpp"
MatrixGraph::MatrixGraph(int vertex_num): matrix(vertex_num, std::vector<int>(vertex_num))
{
}
MatrixGraph::MatrixGraph(const IGraph &graph): matrix(graph.VerticesCount(), std::vector<int>(graph.VerticesCount())) {
for(int i = 0; i < matrix.size(); i++){
std::vector<int> next_... | ALGO | 0.981736 | 3.766342 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-05-28T11:13: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": "01d3edf326f3... |
69108393-7967-4c38-8165-045eaed9c7e4 | JuanPabloCostas/4to-Semestre | EstructuraDeDatos/Extra8.cpp | #include <iostream>
#include <string>
#include <limits>
using namespace std;
class Mayor {
public:
int valor;
int i;
int j;
};
int main(){
Mayor myr;
myr.valor = 0;
myr.i = 0;
myr.j = 0;
int numeroIngresado = 0;
// Codigo para asegurarse que se ingrese un numero *hecho por Jes... | ALGO | 0.994199 | 3.817055 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2023-02-16T15:57: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": "e8399e904... |
fe088f53-77a8-4a3b-b499-35b65b2c933f | Evolving-AI-Lab/cmoea | cmoea_nsga2_mpi.hpp | /*
* modules/cmoea/cmoea_nsga2_mpi.hpp
*
* Created on: Mar 12, 2015
* Author: <NAME>
*/
#ifndef MODULES_CMOEA_CMOEA_NSGA2_MPI_HPP_
#define MODULES_CMOEA_CMOEA_NSGA2_MPI_HPP_
// Standard includes
#include <algorithm>
#include <limits>
// Boost includes
#include <boost/foreach.hpp>
#include <boost/multi_arr... | ALGO | 0.999959 | 6.583689 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2018-07-10T01:58:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bc4dbe41e92... |
ca83de90-b7eb-4a78-aac8-15abfee8341f | danpfister/advent-of-code | 2022/day04/day04.cpp | #include <file_utils.h>
#include <regex>
void part1(std::vector<std::string>& input) {
std::regex pattern("(\\d+)-(\\d+),(\\d+)-(\\d+)");
std::smatch matches;
int count = 0;
for (const auto & line : input) {
if (!std::regex_search(line, matches, pattern)) {
throw std::runtime_error... | ALGO | 0.994918 | 5.328873 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-11-30T18:55:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1fcc3ad8563... |
be1c9397-c1cd-4e40-aebd-f927cd47af70 | kassonlab/gmxapi | src/gromacs/math/functions.h | /*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2015,2016,2018,2019, by the GROMACS development team, led by
* <NAME>, <NAME>, <NAME>, and <NAME>,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
... | ALGO | 0.992517 | 6.63323 | {
"github_metadata": {
"branch": "master",
"commit_count": 19315,
"repo_created_at": "2017-05-25T14:05:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 53,
"forks": 13,
"issues": 93,
"pull_requests": 2
},
"file_meta": {
"content_id": "76ba... |
bc284d7a-f086-4938-9eb8-a58f5f81bfc3 | apples3627/hw13 | sprint3.cpp | #include <iostream>
//#include <Windows.h> for Win (Sleep)
#include <unistd.h> //for Mac (sleep 소문자로)
#include <vector>
#include <fstream>
using namespace std;
int main() {
int elapsedSeconds =0;
int T = 1;
int NI, NO;
int NofPackets[120];
vector <int> queue;
while (elapsedSeconds < 120) {
... | ALGO | 0.971631 | 3.604249 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-05-28T09:59:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d71c66179014... |
ce8973f0-5e0c-449b-bb03-2e71bd633f0c | Kim-WanKyu/AlgorithmStudy | baekjoon/step/step07/Step7_2차원배열/Step7_2차원배열/project_2738.cpp | //1. 행렬 덧셈
#include <iostream>
using namespace std;
int main()
{
int n, m;
cin >> n >> m;
//이차원 배열 동적 할당
int** matrix = new int*[n];
for (int i = 0; i < n; i++)
{
matrix[i] = new int[m];
}
//1번 행렬 입력
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cin >> matrix[i][j];
}
}
//2번... | ALGO | 0.999843 | 4.04148 | {
"github_metadata": {
"branch": "main",
"commit_count": 102,
"repo_created_at": "2023-06-20T21:22: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": "6c3d9c9a44... |
e0d4f6c1-88b2-4c52-9b95-30d2d21aba52 | CNES/Pandora | src/pandora/validation/cpp/src/interpolated_disparity.cpp | /* Copyright (c) 2025 Centre National d'Etudes Spatiales (CNES).
*
* This file is part of PANDORA
*
* https://github.com/CNES/Pandora
*
* 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 ... | ALGO | 0.995638 | 6.239819 | {
"github_metadata": {
"branch": "master",
"commit_count": 1087,
"repo_created_at": "2020-06-15T07:59:10.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 80,
"forks": 16,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa190a... |
0c289420-79a7-4d03-a560-06155b78b91b | genomecuration/JAMg | 3rd_party/trinityrnaseq-v2.11.0/Chrysalis/analysis/KmerTable.cc | #include "aligns/KmerAlignCore.h"
#include "analysis/DNAVector.h"
#include "analysis/KmerTable.h"
#include "util/mutil.h"
#include "analysis/NonRedKmerTable.h"
int K = 12;
const vecDNAVector * pAll = NULL;
DNAVector dummy;
KmerSequence::KmerSequence(int k, const vecDNAVector * p)
{
m_count = 0;
K = k;
pAll ... | ALGO | 0.914427 | 3.920445 | {
"github_metadata": {
"branch": "master",
"commit_count": 564,
"repo_created_at": "2015-05-12T19:14:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 19,
"forks": 8,
"issues": 6,
"pull_requests": 3
},
"file_meta": {
"content_id": "24ac1331... |
6de928ee-fd74-43cc-85db-449309c7ad44 | Kawser-nerd/CLCDSA | Source Codes/AtCoder/arc086/B/3262940.cpp | #include <iostream>
#include <algorithm>
#include <bitset>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <cstring>
#include <utility>
#include <vector>
#include <complex>
#include <valarray>
#include <fstream>
#include <cassert>
#include <cmath>
#include <functional>
#includ... | ALGO | 0.999989 | 3.197514 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-09-30T05:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "780352c5... |
e9f70866-4cfe-4a84-930e-49d8566ade17 | PFelsen/Bachelor_Thesis_Karlsruhe_2024 | mpp/src/lib6_app/pdesolvers/ReactionPDESolver.cpp | #include "ReactionPDESolver.hpp"
#include "GMRES.hpp"
#include "TimeIntegrator.hpp"
#include "Newton.hpp"
void ReactionPDESolver::run(Solution &solution) const {
// assemble->SetTimeSeries(solution.vector);
if (typeid(*assemble) == typeid(PGReactionAssemble)) {
auto timeIntegrator = TimeIntegratorCreator(IMP... | ALGO | 0.999674 | 5.466028 | {
"github_metadata": {
"branch": "main",
"commit_count": 96,
"repo_created_at": "2024-06-27T15:14: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": "247da2d50c3... |
8d52a7f0-513a-40d3-b90e-1bebebda8497 | RyoSci/AtCoder | くじかつ/20220711/c.cpp | // #define _GLIBCXX_DEBUG
#include <algorithm>
#include <atcoder/all>
#include <atcoder/modint>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using namespace atcoder;
usin... | ALGO | 0.999979 | 4.074726 | {
"github_metadata": {
"branch": "master",
"commit_count": 1005,
"repo_created_at": "2020-06-25T03:31:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72e26df... |
eb58f455-03b7-41cf-bd60-4b8916c86f7d | Nickel-Angel/ACM-and-OI | Codeforces/CF1658A.cpp | /*
* @author Nickel_Angel (<EMAIL>)
* @copyright Copyright (c) 2022
*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <vector>
using std::min;
using std::max;
using std::sort;
using std::swap;
using std::vector;
using std::pair;
typedef long long ll;
int n;
char s[110];
inline ... | ALGO | 0.999969 | 4.371867 | {
"github_metadata": {
"branch": "main",
"commit_count": 71,
"repo_created_at": "2021-08-01T23:31:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "7e312f10035... |
48dd481f-758d-428f-8b76-80774e63f0ef | mlosa010/vector-and-array-manipulation | vectors.arrays.lists.cpp | /*
Author: <NAME>
created: 6/20/2017
the following project shows the manipulation and printing of arrays, vectors and lists though functions
passing arrays to functions: https://www.youtube.com/watch?v=mnaD9bH6y6A
manipulating vectors and their values: https://www.youtube.com/watch?v=m8QzXKLP210
*/
#include <iostream>... | ALGO | 0.976774 | 4.014416 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-06-21T05:12: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": "137b059629... |
fbd50fc3-176d-4eea-8d2d-1537fd030dbd | harshit-jain52/CP_DSA | CSES/1651.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;
const int N = 2e5 + 10;
ll arr[N], lazy[4 * N];
void build(int idx, int lo, int hi)
{
lazy[idx] = 0;
if (lo == hi)
{
return;
}
int mid = (lo + hi) / 2;
build(2 * idx + 1, lo, mid);
build(2 * idx ... | ALGO | 0.999906 | 6.131147 | {
"github_metadata": {
"branch": "master",
"commit_count": 526,
"repo_created_at": "2023-06-08T04:49:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b1d6b868... |
39465ad2-1694-4238-b7ce-dbc70be1ac98 | arran210/ParticleSim | src/gas.cpp | #include "gas.h"
#include "pixel_map.h"
#include <random>
#include <iostream>
Gas::Gas(int x, int y, Color color) : Pixel(x, y, color)
{
m_is_solid = false;
}
void Gas::Step(PixelMap* map)
{
bool on_top_edge = m_y_coord == map->GetHeight() - 1;
bool on_bottom_edge = m_y_coord == 0;
bool on_left_edge = m_x_co... | ALGO | 0.959264 | 5.699457 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2025-04-29T15:22: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": "bb7560b3a2... |
5d9b858b-5980-4c1c-ba99-691124925281 | Rakibul-Hassan-1/Phitron-Modules | Semester - 02 Introduction to Algorithms/Introduction to Algorithms/Week 04 - Recap/Assingment/B_Sequence_Game.cpp | #include <iostream>
#include <vector>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
vector<int> b(n);
for (int i = 0; i < n; i++)
{
cin >> b[i];
}
vector<int> a;
a.push_back(b[0]); // Add th... | ALGO | 0.999968 | 4.192388 | {
"github_metadata": {
"branch": "main",
"commit_count": 102,
"repo_created_at": "2023-04-10T15:28:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "820482eb6e... |
8cbc0785-8b37-4bab-93bd-f11fe0add3c7 | KryukovSA/openCL | CL_func.cpp | #include "CL_func.h"
#include <iostream>
#include <string>
void saxpyCL(int n, float a, float* x, int incx, float* y, int incy, cl_device_id device) {
cl_context context = clCreateContext(NULL, 1, &device, NULL, NULL, NULL);
const char * src_saxpy =
"__kernel void saxpy ( int n, float a, ... | ALGO | 0.944312 | 5.30172 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-10-04T14:49:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b5275d7f2f... |
1efc891c-9d6d-4051-94b1-736c9120bfc9 | KaranTalreja/LeetCode | src/two-sum/solution.cpp | class Solution {
public:
int binarySearch(vector<int>& nums, int key, int begin, int end) {
if (begin > end) return -1;
int mid = (begin + end) / 2;
if (nums[mid] == key) return mid;
else if (mid == begin) return -1;
if (nums[mid] > key) return binarySearch(nums, key, begin, mid);
... | ALGO | 0.999995 | 5.643544 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2017-04-01T00:22:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d3cd5a46c... |
a067658c-6cef-4c87-a331-b1826b573b66 | StevensDeptECE/CPE593 | old/LinkedLists/LinkedList2018Ftemplated.cc | #include <iostream>
using namespace std;
template<typename T>
class LinkedList {
private:
class Node {
public:
T v;
Node* next;
Node(T v, Node* n) : v(v), next(n) {}
};
Node* head; // LinkedList<T>::Node
public:
LinkedList() : head(nullptr) {}
~LinkedList() {
for (Node* p = head; p != nullptr; ) {
N... | TOOL | 0.968598 | 4.196974 | {
"github_metadata": {
"branch": "master",
"commit_count": 238,
"repo_created_at": "2017-09-05T19:22:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 62,
"forks": 57,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "7b68199... |
063cc770-2404-4dc7-a6a7-1e27ccb3f900 | shilpa1-naik/Hacking | leetcode/126_wordLadder_II.cpp | // -------------------------------------------------------------------------------------
// Author: <NAME> (cbrghostrider); Copyright - All rights reserved.
// For email, run on linux (perl v5.8.5):
// perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0a"'
// --... | ALGO | 0.99979 | 5.925304 | {
"github_metadata": {
"branch": "master",
"commit_count": 390,
"repo_created_at": "2015-10-14T16:53:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "89335f30... |
872a5f6b-f952-458b-9039-120ef40c81ec | dear-mahmud-bd/problem-solving | 01_Phase/Week-11/Day-4/035Subarrays.cpp | // https://codeforces.com/contest/1809/problem/C
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long int ll;
const int MOD = 1e9+7;
template <typename T> using pbds = tree<T, null_type, less<T>, rb_tree... | ALGO | 0.999851 | 4.059137 | {
"github_metadata": {
"branch": "main",
"commit_count": 66,
"repo_created_at": "2023-06-03T03:50: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": "3235cfb8306... |
afa79d2b-1e61-41ad-bed1-cc8e58dda446 | raincross7/code-similarity | codes/train_code/problem476/problem476_221.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAX_N = 1e5+2, MAX_M = 1e6+1;
ll N, M;
ll a[MAX_N];
ll lcm(ll a, ll b)
{
return a/__gcd(a,b) * b;
}
void solve()
{
// X = A *(2*P+1)
for(int i=0;i<N;++i) a[i] >>= 1;
ll L = 1;
for(int i=0;i<N;++i){
L = lcm(L, a[i]);
... | ALGO | 0.999998 | 3.65834 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05: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": "6900c1c21c37... |
04a314f6-e09d-46ff-a5a6-0466af65188e | AmarSaini/Algorithms | Bellman Ford Graph Traversal/BellmanFord.cpp | #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
static int timer = 0;
struct Vertex; // A temp reference to the Vertex structure for the Weight structure
struct Weight {
Vertex * v;
int weight;
};
struct Vertex {
int num; //... | ALGO | 0.999924 | 3.757252 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-04-13T01:42: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": "cecaf6c278... |
38ddcf3e-975a-4404-87df-43d671671a9c | mdnazisharman2803/beProinCPP | tree/genrictree/pathbetwwwngivennodeandroot.cpp | #include <bits/stdc++.h>
using namespace std;
// defining node
class node{
public:
int data;
vector<node*> children;
node(int val){
this->data=val;
}
};
void creatingtree(node* &root,int arr[],int n){
stack<node*> st;
for(int i=0;i<n;i++){
if(arr[i]==-1){
st.pop();
... | ALGO | 0.999977 | 4.471344 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2022-03-15T06:18:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "69ffcdba8f9... |
482dbab6-0ddd-4118-b985-734f7626fc23 | danielhanchen/cuml | cpp/src_prims/linalg/lstsq.h | /*
* Copyright (c) 2018, NVIDIA CORPORATION.
*
* 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.997168 | 6.540497 | {
"github_metadata": {
"branch": "branch-0.9",
"commit_count": 4317,
"repo_created_at": "2019-07-26T15:30:10.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "rapidsai/cuml",
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content... |
c859fd70-e0c2-4686-8f1b-6b136d2227f3 | NAhmad231/LeetCode-february-Challenge-2025 | Day8_DesignaNumberContainerSystem.cpp | class NumberContainers {
public:
unordered_map<int , int>mp1; // store index with the number
unordered_map<int , set<int>>mp2; // store number with all its index
NumberContainers() {
}
void change(int index, int number) {
// if index is already prese... | ALGO | 0.999932 | 5.789043 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2025-02-08T05:30: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": "5444e2ed831... |
058d7ca9-f69a-4433-95fd-f77df320d02f | indietechjuliet/k-partite-paraclique | src/main.cpp | /*Author: <NAME> - University of Tennessee
*
*Main function of the program, take in command line arguetns, and reads in the
*graph into an adjacency matrix
*
*Date Last Modified: Nov. 14, 2020
*/
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include<bits/stdc++.h>
#include "helper.h"
#... | ALGO | 0.998894 | 4.628879 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2020-11-11T23:25:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "54e6f21dbc6... |
a60594d3-d185-4d3c-80fd-dd8de1d28abf | hiroshi-maybe/topcoder | solutions/FIELDDiagrams/FIELDDiagrams.cpp | #include <fstream> // for greed plugin
#include <iostream>
#include <algorithm> // max,min
#include <vector>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>... | ALGO | 0.999311 | 4.60524 | {
"github_metadata": {
"branch": "master",
"commit_count": 1437,
"repo_created_at": "2015-05-24T07:26:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5fe92b... |
b3b769f3-bbc6-47bb-a2ed-bf5e97513ec7 | mzry1992/workspace | contest/20120629/Molar mass.cpp | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
double res;
char buf[5000];
int len;
int main()
{
int totcas;
scanf("%d",&totcas);
for (int cas = 1;cas <= totcas;cas++)
{
scanf("%s",buf);
len = strlen(buf);
res = 0;
for (int i = 0;i < len;i... | ALGO | 0.977773 | 3.187997 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2012-11-03T05:40: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": "f96010b4e... |
62ef3120-bb7c-4dd2-93c8-b1b7c044c99a | panditakshay402/Hacktoberfest | C++/Longest_Common_Subsequence.cpp | #include <iostream>
#include <vector>
using namespace std;
int lcs(string text1, string text2) {
int m = text1.length();
int n = text2.length();
vector<vector<int>> dp(m + 1, vector<int>(n + 1, 0));
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
if (text1[i - 1] ==... | ALGO | 0.99983 | 5.846151 | {
"github_metadata": {
"branch": "main",
"commit_count": 192,
"repo_created_at": "2023-10-04T06:27:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 114,
"forks": 390,
"issues": 19,
"pull_requests": 106
},
"file_meta": {
"content_id": "1ec... |
aea40b4b-c364-4a95-94b4-19a20884a35f | defaultmodel/bignum | src/main.cpp | #include "../lib/Bignum.hpp"
#include "../lib/rsa.hpp"
#include "../lib/progressbar.hpp"
#include <chrono>
#include <cstdlib>
#include <iostream>
#include <string>
#include <utility>
using namespace std;
struct RSAResult {
string message; /// Message original
vector<Bignum> cypher;
string plaintext; /// Message... | ALGO | 0.988179 | 5.378414 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-06-30T15:00: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": "814814720aa... |
cd8a008b-5c85-428f-a758-7ed55d324e35 | YCHEN-NYU/PlayWithLeeCode | DataStructures/TopDownMerge.cpp | /* Sorting an array using Merge Sort (MergeSort.cpp) */
#include <iostream>
using namespace std;
void mergeSort(int a[], int size);
void mergeSort(int a[], int iLeft, int iRight, int work[]);
void merge(int a[], int iLeftHalfLeft, int iLeftHalfRight,
int iRightHalfLeft, int iRightHalfRight, int work[]);
vo... | ALGO | 0.999995 | 6.055318 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2016-09-22T22:23:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "471f648ff... |
9121b89f-e4c1-4556-8eb4-b76a5399e325 | alexandraback/datacollection | solutions_5630113748090880_0/C++/KennyHORROR/B.cpp | #ifdef DEBUG
//#define _GLIBCXX_DEBUG
#endif
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <string>
#include <cstring>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <ctime>
#include <cassert>
#incl... | ALGO | 0.99976 | 3.841982 | {
"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": "e9c55d79c... |
f170cfce-7891-4914-aa6b-446dd511b89f | lclpsoz/competitive-programming | ARCHIVE/2018-03-28-2100/10528.cpp | #include <bits/stdc++.h>
using namespace std;
int i, j, k;
int notes[14]; //C, C#, D, D#, ... From 1 to 12 in bits (the 13 is C, that's the same as 1)
int note, aux;
char str[1010], *substr;
char notes_str[12][3] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"};
bool print;
int main ()
{
for (i = ... | ALGO | 0.999486 | 4.16968 | {
"github_metadata": {
"branch": "master",
"commit_count": 274,
"repo_created_at": "2020-07-09T09:09:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4ceb22f7... |
40a4e742-b77b-49fd-8dff-d029f899554a | tugrulyatagan/itu_comp_eng_lectures | BIL 105E - Intr to Sci&Eng Comp (C)/Sınav Soruları/2008/midterm_polygon.cpp | // BIL105E MIDTERM EXAM
// SOLUTION OF POLYGON QUESTION
/* TEST DATA FOR POLYGON PROBLEM:
Inputs: N = 5 , Point coordinates = (3 7) (6 4) (3 -2) (-6 1) (-6 7)
Expected outputs: A = 81 , Cx = 0 , Cy = 3
*/
#include <iostream.h>
#include <stdlib.h>
int main()
{
int X[100],Y[100]; // Array... | ALGO | 0.999701 | 5.050238 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2020-09-20T11:47:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "36e1ab11... |
12a1a4de-6e69-4692-8c6d-f72d3e03b244 | sudhanshu-t/DSA | InterviewPrep/Array _ Strings/longPressed.cpp | #include<iostream>
using namespace std;
// -----------------------------------------------------
// This is a functional problem. Only this function has to be written.
// This function takes as input 2 strings
// It should return boolean output.
bool isLongPressedName(string &name, string &typed) {
// Write your c... | ALGO | 0.99994 | 4.218592 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-07-09T11:48: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": "816a156c0... |
564ad0b1-bec5-4c3e-9c38-f73e897bcf83 | MaciejNET/ZombieAttack | src/Collisions/OrientedBoundingBox.cpp | #include "OrientedBoundingBox.hpp"
#include <memory>
#include <cmath>
namespace Collisions {
OrientedBoundingBox ComputeOrientedBoundingBox(const std::vector<std::shared_ptr<Core::Mesh>>& meshes, const glm::mat4& transform)
{
glm::mat3 rotationMatrix = glm::mat3(transform);
glm::vec3 minBounds... | ALGO | 0.998719 | 7.539257 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2024-11-14T13:50:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "b35443747f9... |
d206c644-d1fe-42b4-8fd1-eaba7110e6cd | ou3slati/competitive-programming | Implementations/Codeforces/Training/626/C.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
int N; cin>>N;
string s; cin >>s;
/*int x=0, y=0;
for (int i=0; i<N; i++){
if(s[i]=='(') x++;
else y++;
}
if(x!=y){ cout << -1 << endl; return 0;}
stack <pair<int,char>> st;
... | ALGO | 0.999647 | 3.782868 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2025-06-30T20:23: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": "8d17fbcbc28... |
d1ff735f-51fb-4cc1-963e-aeadbf2f550b | dillongoostudios/goo-engine | source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh | /* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include "BLI_math_vector_types.hh"
#include "GPU_texture.h"
#include "COM_context.hh"
namespace blender::realtime_compositor {
/* --------------------------------------------------------------------
*... | ALGO | 0.978494 | 6.838387 | {
"github_metadata": {
"branch": "goo-engine-main",
"commit_count": 132039,
"repo_created_at": "2021-05-08T09:53:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1109,
"forks": 148,
"issues": 44,
"pull_requests": 6
},
"file_meta": {
"conte... |
089b2e40-7aa4-4ab0-b1da-9e463bfdddae | RobertHajbok/Algoritmi | Library Sort/Library Sort/LibrarySort.cpp | /* LIBRARY SORT
Cazul mediu: O(N log N)
Cazul defavorabil: O(N^2)
Memorie folosita: O(N)
Stabil: DA
Sortare descrescatoare: a[i]<a[i+1]
Sortare crescatoare: a[i]>a[i+1]
Descriere: Library Sort este un algoritm de sortare care foloseste sortarea prin insertie, insa cu "gap"-uri pentru a accelera
sortarea. Totusi, ... | ALGO | 0.999982 | 3.30704 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-12-24T01:09:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "678ebd3571... |
cc68c2ba-b032-4171-87f4-80e96669bc61 | Ascend/samples | cplusplus/level2_simple_inference/2_object_detection/YOLOV4_coco_detection_picture/src/post_process.cpp | /*
* Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless requir... | DATA | 0.95741 | 4.828212 | {
"github_metadata": {
"branch": "master",
"commit_count": 3546,
"repo_created_at": "2020-11-16T11:38:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 129,
"forks": 40,
"issues": 8,
"pull_requests": 1
},
"file_meta": {
"content_id": "f4e2c... |
33fbe778-512c-4722-9b28-fd4a2ae30474 | MohammadNabizada/Data-Structures-and-Algorithms | Queues/Exercises.cpp | #include <iostream>
#include <queue>
#include <stack>
//Adding a new method to queue built-in class in cpp
template <typename T>
class CustomQueue : public std::queue<T>
{
public:
void reverse()
{
std::stack<T> stack;
while(!this->empty())
{
stack.push(this->front());
... | ALGO | 0.99397 | 5.1135 | {
"github_metadata": {
"branch": "main",
"commit_count": 305,
"repo_created_at": "2025-02-13T09:35:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f398320ef0... |
a07eb3f8-625c-4186-bb80-120c452a6fe6 | thunth/CppApplication_1 | UCLN.cpp | /*
* File: UCLN.cpp
* Author: hoaithu
*
* Created on October 4, 2015, 4:16 PM
*/
#include <cstdlib>
#include<iostream>
using namespace std;
/*
* Viết chương trình xây dựng một lớp có tên là DATA bao gồm:
- Dữ liệu: a,b là hai số bất kỳ nhập từ bàn phím
- Phương thức: Nhập, xuất dữ liệu, hàm thành phần tìm ư... | ALGO | 0.998676 | 4.050485 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2015-10-11T09:40:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "494f2b679f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.