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 |
|---|---|---|---|---|---|---|---|
ea26dabe-dbfa-41e8-a4ee-26c055028fe1 | pytorch/pytorch | torch/csrc/lazy/core/ir_util.h | #pragma once
#include <unordered_map>
#include <vector>
#include <torch/csrc/lazy/core/ir.h>
namespace torch::lazy {
class TORCH_API Util {
public:
// Tracks the emission status of the nodes during the post-order generation.
// It helps tracking loops within the computation graphs.
enum EmitStatus {
kNot... | ALGO | 0.929145 | 7.733644 | {
"github_metadata": {
"branch": "main",
"commit_count": 90499,
"repo_created_at": "2016-08-13T05:26:41.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 91573,
"forks": 24684,
"issues": 5000,
"pull_requests": 1303
},
"file_meta": {
"content_i... |
cd270b90-e527-44a7-a535-0d172ebbbaf6 | Ezequiel1721/EjerciciosCPP | villancico.cpp | /*
@@ Instituto Tecnológico de Tijuana
@@ Depto de Sistemas y Computación
@@ Ing. En Sistemas Computacionales
@@ Lenguajes de Interfaz
@@
@@ Autor : <NAME> @nickname: Ezequiel1721
@@ Repositorio: https://github.com/Ezequiel1721/EjerciciosCPP.git
@@ Fecha de revisión: 16 de Octubre de 2020
@@
@
@ Objetivo del programa:
... | ALGO | 0.999946 | 5.417647 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2020-10-16T05:57: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": "9898dd7d1c36... |
52392620-699d-412b-94e9-b036aa452851 | alexandraback/datacollection | solutions_1484496_0/C++/tokoharu/C.cpp | #include <algorithm>
#include <cmath>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
... | ALGO | 0.999694 | 3.059126 | {
"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": "ef8727a37... |
47009afc-56ae-482f-bccd-48862daa5ddf | floodyberry/supercop | crypto_aead/oceankeyakv2/ref/Keyakv2.cpp | /*
Implementation by the Keccak, Keyak and Ketje Teams, namely, <NAME>,
<NAME>, <NAME>, <NAME> and <NAME>, hereby
denoted as "the implementer".
For more information, feedback or questions, please refer to our websites:
http://keccak.noekeon.org/
http://keyak.noekeon.org/
http://ketje.noekeon.org/
To the extent possib... | ALGO | 0.947319 | 6.291697 | {
"github_metadata": {
"branch": "master",
"commit_count": 158,
"repo_created_at": "2012-03-17T03:41:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 99,
"forks": 34,
"issues": 3,
"pull_requests": 1
},
"file_meta": {
"content_id": "d0c973... |
02dd60df-9297-4aa4-8b92-835f40a4c3d8 | mathletedev/cp | CSES/1676.cpp | #include <iostream>
#include <vector>
struct DSU {
std::vector<int> e;
DSU(int n) { e.assign(n, -1); }
int comp(int x) { return e[x] < 0 ? x : e[x] = comp(e[x]); }
bool same_set(int x, int y) { return comp(x) == comp(y); }
int size(int x) { return -e[comp(x)]; }
bool unite(int x, int y) {
x = comp(x), y = co... | ALGO | 0.99986 | 4.709156 | {
"github_metadata": {
"branch": "main",
"commit_count": 159,
"repo_created_at": "2022-06-13T03:27:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b3dede88a0... |
08cc3fcd-2726-4941-9d3f-2796dfc84d3b | gs18103/PS | BOJ/Archive/3596.cpp | #include <bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
#define em emplace
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
const int MAX = 2020;
const int INF = 1e9;
const ll LINF = 1e18;
int dp[MAX];
bo... | ALGO | 0.999983 | 3.836843 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2024-03-02T00:20:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "69b439454e8... |
45263c1b-1c8d-4366-aeeb-d36009016ea7 | AkashVerma1515/DSA | graph/bipartite-graph-dfs.cpp | // { Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
bool dfs(int i, int V, vector<int> adj[], vector<int> &color)
{
if(color[i] == -1)
{
color[i] = 1;
}
for(auto it : adj[i])
{
if(c... | ALGO | 0.999949 | 5.871255 | {
"github_metadata": {
"branch": "main",
"commit_count": 82,
"repo_created_at": "2021-05-17T17:14:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa8d108823a... |
f6eb477d-a0f2-4297-9047-f25ce66f6688 | jhlenes/usv_simulator | otter_control/src/controller.cpp | #include <otter_control/controller.h>
#include <std_msgs/Float32.h>
#include <std_msgs/String.h>
#include <tf2/utils.h>
#include <tf2_ros/transform_listener.h>
#include <eigen3/Eigen/QR>
#include <cmath>
OtterController::OtterController() : T(3, 2)
{
ros::NodeHandle nh;
m_leftPub = nh.advertise<std_msgs::Floa... | ALGO | 0.942032 | 5.053398 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-06-08T14:21:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 69,
"forks": 14,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "5bd49aed... |
ac275020-1b2f-47ed-8488-308c26389c71 | sudharkj/cs575 | proj06/src/first.cpp | // 1. Program header
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#ifdef WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
#include <omp.h>
#include "CL/cl.h"
#include "CL/cl_platform.h"
#ifndef GLOBAL_SIZE
#define GLOBAL_SIZE 64*1024*1024
#endif
#define NUM_ELEMENTS GLOBA... | ALGO | 0.962183 | 4.015296 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-04-07T03:33:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "88821dffc... |
16d88131-c9bd-422c-a473-4b94ef58f1de | Rafbillpc/kaggle2023 | src/kociemba_phase1.hpp | #pragma once
#include "header.hpp"
#include "rubik.hpp"
#include "rubik_tables.hpp"
#include "rubik_pruning_table.hpp"
#include "rubik_sym_table.hpp"
#include "rubik_move_table.hpp"
#include "rubik_search.hpp"
#include "util.hpp"
namespace rubik {
const i32 pow3[8] = {1,3,9,27,81,243,729,2187};
static inline
... | ALGO | 0.999733 | 6.020804 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-01-31T23:32:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b27b48ab9cfe... |
ff14c1a5-e4d0-4aa9-b5b3-2f95c7462db2 | sachuverma/DataStructures-Algorithms | DSA Crack Sheet/solutions/Add two numbers represented by linked lists.cpp | /*
Add two numbers represented by linked lists
==============================================
Given two numbers represented by two linked lists of size N and M. The task is to return a sum list. The sum list is a linked list representation of the addition of two input numbers from the last.
Example 1:
Input:
N = 2
va... | ALGO | 0.999984 | 5.93494 | {
"github_metadata": {
"branch": "master",
"commit_count": 1430,
"repo_created_at": "2020-10-07T10:08:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2049,
"forks": 541,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0c... |
f6a5b6e2-f204-4401-8030-e13535290683 | Nithilaa/DAA-Problem-Sheet-1 | factorial.cpp | #include<iostream>
using namespace std;
int fact_with_recur(int n);
int fact_without_recur(int n);
int main()
{
int n;
cout << "Enter a positive integer: ";
cin >> n;
cout<<"\n";
cout << "Factorial of " << n << " with recursion" << " = " << fact_with_recur(n) <<"\n";
cout << "Factorial of " <... | ALGO | 0.999378 | 4.918291 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2020-09-14T09:25:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7b7f6b65e... |
c3338118-b435-4d5b-9b25-53eb1f2c957a | notonlysuccess/leetcode | Rotate List.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode *rotateRight(ListNode *head, int k) {
if (!head) {
return head;
}
ListNode *last = head... | ALGO | 0.99998 | 5.895094 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2013-09-04T14:29:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3b387d2... |
95c165ed-e09c-4756-9fe8-8e7d0b82d9d5 | kamehamehaa0000/Strivers-A2Z-DSA-Sheet-Practice- | Step 16 - Graphs/3-Topological Sort Problems/2-KahnsAlgo.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
/*toposort bfs approach*/
// Function to return list containing vertices in Topological order.
vector<int> topoSort(int V, vector<int> adj[])
{
queue<int> q;
// store indegree
vector<int> indegree(V, 0);
... | ALGO | 0.999931 | 5.147626 | {
"github_metadata": {
"branch": "main",
"commit_count": 143,
"repo_created_at": "2024-03-07T15: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": "cfd6353297... |
1ea47472-2bcd-4c9e-8788-69a608a93a16 | GRTLCollaboration/Chombo | lib/test/EBAMRTools/aveConserveTest.cpp | #ifdef CH_LANG_CC
/*
* _______ __
* / ___/ / ___ __ _ / / ___
* / /__/ _ \/ _ \/ V \/ _ \/ _ \
* \___/_//_/\___/_/_/_/_.__/\___/
* Please refer to Copyright.txt, in Chombo's root directory.
*/
#endif
// <NAME> Nov 20 2001
#include "BaseIVFactory.H"
#include "EBIndexSpace.H"
#... | ALGO | 0.92784 | 3.036162 | {
"github_metadata": {
"branch": "main",
"commit_count": 89,
"repo_created_at": "2018-01-30T14:07:31.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 16,
"forks": 12,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae494f9c81... |
cfe1e554-e0bf-41e7-9830-65e7ca266667 | thanhlota/Data-structure-and-algorithm | School Algorithms/Fib.cpp | #include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
vector<ull> v(101, 0);
ull fib(int n)
{
if (n == 0)
return 0;
if (n == 1)
return 1;
if (v[n - 1] == 0)
v[n - 1] = fib(n - 1);
if (v[n - 2] == 0)
v[n - 2] = fib(n - 2);
return v[n - 1] + v[n -... | ALGO | 0.999933 | 4.156201 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2021-11-04T18:32: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": "70e5a352c2... |
98ccb3d6-8f5f-4543-bc76-1da71d31b911 | Z3Prover/z3 | src/qe/mbp/mbp_arith.cpp | /*++
Copyright (c) 2015 Microsoft Corporation
Module Name:
qe_arith.cpp
Abstract:
Simple projection function for real arithmetic based on Loos-W.
Author:
<NAME> (nbjorner) 2013-09-12
Revision History:
Moved projection functionality to model_based_opt module. 2016-06-26
--*/
#include "qe/mbp/mb... | ALGO | 0.988833 | 4.842749 | {
"github_metadata": {
"branch": "master",
"commit_count": 19811,
"repo_created_at": "2015-03-26T18:16:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11200,
"forks": 1542,
"issues": 160,
"pull_requests": 6
},
"file_meta": {
"content_id":... |
40958130-7f27-450f-8bd5-81144d12e1c3 | 2giosangmitom/dsa-roadmap | src/solutions_70/solutions_70.hpp | #pragma once
#include <unordered_map>
#include <vector>
using namespace std;
class Solution {
private:
unordered_map<int, int> memo;
public:
// Top-down approach
int climbStairs(int n) {
if (n <= 2) return n;
if (memo.contains(n)) {
return memo[n];
}
mem... | ALGO | 0.999989 | 6.330183 | {
"github_metadata": {
"branch": "master",
"commit_count": 456,
"repo_created_at": "2025-01-13T07:59:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ad4bfb37... |
d9a609a8-4a66-4e1a-9ef9-a09189a440c3 | JoaoDanielRufino/Online-Judges | LeetCode/insert_interval.cpp | // Solution 1
class Solution {
public:
static bool myComp(const vector<int> a, const vector<int> b) {
if(a[0] < b[0])
return true;
if(a[0] == b[0] && a[1] < b[1])
return true;
return false;
}
vector<vector<int>> insert(vector<vector<int>>& intervals, vect... | ALGO | 0.999984 | 5.975549 | {
"github_metadata": {
"branch": "master",
"commit_count": 655,
"repo_created_at": "2019-03-23T03:39:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "57a8cae9... |
9c28767e-13fa-4db3-bc6f-43b471fd1b7c | FireNick44/IMS | 1.jahr/xÜbungen/ÜbungenB05/GAME.cpp | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <cstdlib>
#include <time.h>
int main()
{
system("mode con cols=170 lines=40");
system("color b");
srand((unsigned)time(NULL));
int min = 0;
int max = 0;
int eingabe;
int count = 0;
int end = 0;
int again = 0;
char yn = 'a';
char... | ALGO | 0.946354 | 3.049227 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2021-09-03T09:13: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": "47891e29341... |
6b28ad21-17c7-40bd-9600-80905db97c6e | AnuragMacOS/Cpp | C++:oops/9.friendclass.cpp | #include <iostream>
using namespace std;
// forward declaration of complex class
class complex; //telling that complex class cha yo code ma,we're gving assurity
class calculator
{
public:
int sumRealcomplex(complex ,complex);
int sumImgcomplex(complex , complex);
// declaration matra diye hamiley ya.
//yes... | TOOL | 0.933636 | 4.700272 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2025-06-23T04:44: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": "a2155c37729... |
414f7dd2-174e-4d5b-ab39-623bc8f0e290 | Cartography-jpl/geocal | lib/GeoCalCore/Implementation/ray_intersect.cc | #include "ray_intersect.h"
#include "geocal_matrix.h"
using namespace GeoCal;
void RayIntersect::two_look_vector_intersect
(const CartesianFixed& P1,
const CartesianFixedLookVector& L1,
const CartesianFixed& P2,
const CartesianFixedLookVector& L2,
boost::shared_ptr<CartesianFixed>& P, double& Dist)
{
// Given a ... | ALGO | 0.999503 | 5.081512 | {
"github_metadata": {
"branch": "master",
"commit_count": 3202,
"repo_created_at": "2022-07-20T19:43:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f5566d5c... |
a7ebd87f-b0c0-439d-8be0-64eb1bd91792 | fbia/Regression-with-a-Multi-Layer-Perceptron | neuron.cpp | #include "neuron.h"
#include <iostream>
Neuron::Neuron(unsigned num_outputs, unsigned my_index) {
for (unsigned c = 0; c < num_outputs; ++c) {
output_weights_.push_back(Connection());
output_weights_.back().weight = randomWeight();
}
my_index_ = my_index;
gradient_ = 0;
//full_gradient_ = 0;
output_val_ = 0... | ALGO | 0.972721 | 4.68277 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2017-05-07T18:40:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d7b75ff65... |
3fc1920b-f666-4471-9665-cff5dacbc404 | p-r-e-m-singh/DISCRETE-STR | ques4.cpp | #include <iostream>
using namespace std;
class Relation{
public:
// Members of class
bool** matrix;
int n; // order - n
Relation(int side){
n = side;
this->matrix = new bool*[side];
for (int i = 0; i < side; i++){
this->matrix[i] = new bool[side];
for (i... | ALGO | 0.999973 | 5.047862 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2022-04-23T08:53:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a35a2a7fb55... |
79fb88af-1f15-4515-bf0b-011f19988683 | neppiness/TIL | problem-solving/boj/random-defense/10282-02-04-2023.cpp | #include <bits/stdc++.h>
using namespace std;
const int NMX = 10'000;
const int MMX = 100'000;
const int INF = 0x7f7f7f7f;
vector<pair<int, int>> adj[NMX + 2];
int dist[NMX + 2];
int n, m, st;
void setup() {
memset(dist, 0x7f, sizeof(dist));
cin >> n >> m >> st;
for(int i = 1; i <= n; i++)
adj[i].clear()... | ALGO | 0.999905 | 3.992759 | {
"github_metadata": {
"branch": "main",
"commit_count": 623,
"repo_created_at": "2022-05-13T05:47:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97db7890b2... |
c73ec396-9a59-4bcf-8e73-a11786be0bd9 | TobiasGrothmann/Spatial-Audio-Plugin-for-Unreal-Engine | Plugin/SpatialAudio/Source/SpatialAudio/Vbap/Private/Vbap.cpp | #include "../Public/Vbap.h"
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <stdint.h>
#define VBAP_DEG_TO_RAD_F 0.01745329238474369049072266f
FVbap::FVbap()
: v_nls(0)
, v_n(0)
, v_matrices(nullptr)
, v_indices(nullptr)
, v_dim(0)
{
}
FV... | ALGO | 0.999582 | 4.53299 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2021-03-11T09:44:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0c745211380... |
dfdf697b-b549-4f9d-b603-da5e996d01e9 | hsson0822/Online_Judge | 백준/Gold/1976. 여행 가자/여행 가자.cc | #include <iostream>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#include <sstream>
#include <climits>
#include <math.h>
#include <cstring>
using namespace std;
int N;
int M;
vector<int> graph[201];
... | ALGO | 0.999995 | 4.680275 | {
"github_metadata": {
"branch": "main",
"commit_count": 673,
"repo_created_at": "2023-10-17T13:25: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": "7e8c47b6ca... |
9d303d2c-6332-4e6f-93d5-4cfdd8c7e78b | shankerabhigyan/dsa-code | InterviewBit/binary search/medianMatrix.cpp | #include<bits/stdc++.h>
using namespace std;
int getIndex(vector<int>&v, int x){
int left = 0;
int right = v.size()-1;
while(left<=right){
int mid = left + (right-left)/2;
if(x==v[mid]) return mid;
if(x>v[mid]) {
left = mid + 1;
}
else{
right... | ALGO | 0.999994 | 5.689336 | {
"github_metadata": {
"branch": "main",
"commit_count": 268,
"repo_created_at": "2023-03-24T11:01:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "120c448447... |
adb4f7aa-e016-4afa-af27-bca03729e491 | zerodawn1802/VS | CPPMAT14.cpp | #include<bits/stdc++.h>
#define ll long long
using namespace std;
int a[1005][1005], dd[1005][1005] = {0};
int main()
{
int t;
cin >> t;
while(t--)
{
int n, m;
cin >> n >> m;
for(int i = 1; i <= n; i++)
{
for(int j = 1; j <= m; j++) cin >> a[i][j];
}
... | ALGO | 0.999959 | 3.913216 | {
"github_metadata": {
"branch": "GitTest",
"commit_count": 39,
"repo_created_at": "2020-10-25T09:31:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7defbee1... |
e74c37c8-61a5-4317-afd2-31d0a4b7b041 | samuelfangjw/aoc | 2020/Day4.cpp | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
ll p1Result = 0;
ll p2Result = 0;
void solve(string p) {
vector<string> keys = {"byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"};
for (string s : keys) {
if (!regex_search(p, regex(s))) {
return ;
}
}
p... | ALGO | 0.991926 | 4.561578 | {
"github_metadata": {
"branch": "main",
"commit_count": 169,
"repo_created_at": "2020-12-12T17:08:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "48a711a58e... |
eb6b4cc5-3add-4ebc-a6e5-d6e1a70d0247 | Bot-wxt1221/OI-School | 11.9/tii.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#define int __int128
inline int read();
char temp[500005];
std::pair<int,int>pa[500005];
int pre[500005];
signed main(){
#ifndef ONLINE_JUDGE
freopen(".in","r",stdin);
freopen(".out","w",stdout);
#endif
int T=read();
int cnt=0;
whil... | ALGO | 0.999917 | 3.209357 | {
"github_metadata": {
"branch": "master",
"commit_count": 201,
"repo_created_at": "2024-03-22T03:15:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f1444542... |
3a1ada78-afab-4b23-97c0-e5e557f096c5 | w2507154692/Cpp | AJR/二分/二分答案1.cpp | #include <bits/stdc++.h>
#include <iostream>
#include <string.h>
using namespace std;
// 树形 dp(10)
// 二分答案(AC)
// P6058
#define INFINITY 2e17
typedef struct{
int w;
vector<int> child;
}TNode;
typedef struct{
long long t1; //从根到该家庭并回去的时间
long long t2; //第一个家庭依次访问到该家庭并回去的时间
}Family;
vector<TNode> T(2e... | ALGO | 0.999966 | 4.106462 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-06-14T15:25: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": "1354c87c768b... |
6b2c12fe-03c2-42e6-bc21-52798c63e678 | ashish25-bit/data-structure-algorithms | Trees/Tree-From-Inorder-Postorder.cpp | #include <bits/stdc++.h>
using namespace std;
class Node {
public:
int data;
Node* left;
Node* right;
Node(int val) {
data = val;
left = NULL;
right = NULL;
}
};
int getIndex(vector<int> arr, int x) {
for (int i=0; i<arr.size(); i++) {
if (arr[i] == x) return i;
}
return -1;
}
Node... | ALGO | 0.999997 | 5.953818 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2020-10-19T12:27:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e3cb46edc... |
9288daec-c5a8-4600-a293-a05aa6a41fc0 | Chiki1601/Hackerearth-Solutions | Data Structures/Advanced data structures/Segment trees/Transaction.cpp | #include <bits/stdc++.h>
using namespace std;
int arr[100050];
struct node
{
vector<long long>v;
}st[4000000];
void build(long long idx, long long a, long long b)
{
if(a == b)
{
st[idx].v.push_back(arr[a]);
return;
}
int m = (a + b) >> 1;
build(2 * idx, a, m);
build(2 * i... | ALGO | 0.999999 | 4.824487 | {
"github_metadata": {
"branch": "main",
"commit_count": 1808,
"repo_created_at": "2022-09-09T09:13:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "8261b994... |
a9c15d26-8d10-4a7d-8d77-d0b3610683c9 | GR1GAfuruya/project_apostle | sources/collision.cpp | #include "collision.h"
#include "user.h"
#include "camera.h"
bool Collision::hit_check_circle(const DirectX::XMFLOAT2& pos1, float r1, const DirectX::XMFLOAT2& pos2, float r2)
{
float x = pos1.x - pos2.x;
float y = pos1.y - pos2.y;
float r = r1 + r2;
return (x * x) + (y * y) <= (r * r);
}
bool Collis... | ALGO | 0.99812 | 4.416614 | {
"github_metadata": {
"branch": "main",
"commit_count": 153,
"repo_created_at": "2022-08-10T08:50:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ffb3a5ef7e... |
c085064c-2e97-4e32-83d5-cd675d32f0f8 | chishanw/static-program-analyser | Team02/Code02/src/spa/src/Query/Optimizer/QueryOptimizer.cpp | #include "QueryOptimizer.h"
#include <algorithm>
#include <functional>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
using namespace std;
using namespace query;
using namespace optimizer;
const unordered_set<RelationshipType> expensiveRelationships = {
... | ALGO | 0.988408 | 6.925046 | {
"github_metadata": {
"branch": "master",
"commit_count": 128,
"repo_created_at": "2022-03-26T11:03: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": "1b2ba566... |
b31681ac-6008-43e4-bd5f-cd4bc10976d7 | cetina19/Pose_Classification | cpp/Angle_Calculator.cpp | #include <opencv2/opencv.hpp>
#include <mediapipe/framework/formats/landmark.pb.h>
#include <cmath>
#include <vector>
using namespace std;
float calculateAngle(const cv::Point& a, const cv::Point& b, const cv::Point& c) {
float radians = atan2(c.y - b.y, c.x - b.x) - atan2(a.y - b.y, a.x - b.x);
float angle =... | ALGO | 0.983607 | 5.301041 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-07-01T21:36: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": "558f371984bb... |
f3985642-c094-4f9c-be37-7915e2ebb7c9 | necla-ml/ve-jit | tools/allsyms.cpp | /* Copyright (c) 2019 by NEC Corporation
* This file is part of ve-jit */
#error "This was originally based on wrong code"
//
// https://stackoverflow.com/questions/15779185/list-all-the-functions-symbols-on-the-fly-in-c-code-on-a-linux-architecture
// https://stackoverflow.com/questions/29903049/get-names-and-address... | TOOL | 0.933969 | 6.127421 | {
"github_metadata": {
"branch": "master",
"commit_count": 301,
"repo_created_at": "2019-03-18T18:35:55.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5be6cad2c... |
0560d536-ae4f-4c09-b950-ecc2caa4d420 | ThanhPhammmm/DSA_PTIT | 12.SCTDLTree/SCTDLTree004.cpp | /*Done*/
#include <bits/stdc++.h>
using namespace std;
struct TreeNode{
int value;
TreeNode* left;
TreeNode* right;
TreeNode(int x){
value = x;
left = NULL;
right = NULL;
}
};
void rightSideView(TreeNode* root){
queue<TreeNode*> q;
q.push(root);
while(!q.empty... | ALGO | 0.999972 | 5.213661 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2025-06-10T16:05: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": "04986b0135... |
74fd2003-e05b-43e9-8c15-044f1fb6e7ae | TimothyHorscroft/competitive-programming | atcoder/abc337/g.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i, a, b) for (int i=(a); i<(b); ++i)
#define ROF(i, a, b) for (int i=(a); i>(b); --i)
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int,int>
signed main() {
ios::sync_with_stdio(0), cin.tie(0);
int n;
cin... | ALGO | 0.99992 | 3.882523 | {
"github_metadata": {
"branch": "master",
"commit_count": 92,
"repo_created_at": "2020-07-03T11:07: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": "d85a60e35... |
ae0edd7d-a295-4a27-98fa-ea600a59d9e1 | 2018331056shanto/Problem-Solving | Mixed code Library/articulation_point.cpp | // #include <iostream>
// #include <vector>
// #define sz 100000
// #define pb push_back
// using namespace std;
// vector<int> adj[sz];
// bool arti_point[sz], visited[sz];
// int d[sz], low[sz], l=0;
// void findArticulationPoint(int u, int par)
// {
// low[u] = d[u] = ++l;
// visited[u] = true;
// int... | ALGO | 0.999773 | 5.063283 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2022-06-24T09:13: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": "59002b6c41c... |
2eedb844-905c-4b15-8576-24bd9032871b | Anurag-zr/dsa | disjoint_set_data_structure/l_m_947_most_stones_removed.cpp | #include<bits/stdc++.h>
using namespace std;
class DisjointSet{
public:
vector<int> parent;
vector<int> size;
public:
DisjointSet(int n){
parent.resize(n+1);
size.resize(n+1,1);
for(int i=0;i<=n;i++) parent[i]=i;
}
... | ALGO | 0.998938 | 5.043808 | {
"github_metadata": {
"branch": "main",
"commit_count": 324,
"repo_created_at": "2022-06-01T16:31:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "356922c069... |
71b7bce2-bf21-4fa4-bd56-6de5d969a049 | Penguin5681/LeetCodeSolutions | MultiplyStrings.cpp | // 43. Multiply Strings
#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
string multiply(string num1, string num2) {
if (num1 == "0" or num2 == "0") return "0";
vector<int> num(num1.size() + num2.size(), 0);
string rsl = "";
for (int i = num1.size() ... | ALGO | 0.999992 | 5.58917 | {
"github_metadata": {
"branch": "main",
"commit_count": 234,
"repo_created_at": "2023-06-29T16:04:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0eb0c7ea9a... |
65146f7f-8534-4cda-a59f-37468ac8d380 | mohamedelraghy/Problem-Solving | Codeforces/1294A - Collecting Coins.cpp | #include <bits/stdc++.h>
using namespace std;
#define P(x) cout << #x << " = { " << x << " }\n"
#define Time cerr << "Time Taken: " << (float)clock() / CLOCKS_PER_SEC << " Secs" << "\n";
#define INF 1000000000
#define pb(x) push_back(x);
// shortcuts for "common" data types in contests
typedef long long ll;
ty... | ALGO | 0.999959 | 4.317919 | {
"github_metadata": {
"branch": "master",
"commit_count": 224,
"repo_created_at": "2018-03-29T11:53: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": "e56ef30a... |
2e32a26c-070d-44cd-94f4-2749df26294a | FFahrenheit/Data-Structures | ED-I/Algoritmos/main.cpp | #include <iostream>
#include "ListaEstatica.h"
#include "algoritmos.h"
#include <time.h>
/***
* Tgo. <NAME>
***/
using namespace std;
int main()
{
srand (time(NULL));
ListaEstatica<int> numeros;
for(size_t i(0); i<8;i++)
{
size_t size = rand()%200+10;
size_t toSearch = rand()%(size-1... | ALGO | 0.99912 | 4.486796 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-08-19T22:38: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": "ea68e8ce8556... |
b79ed144-24b0-47f7-986e-395fb3db820a | Lee-Hyeon/cpp | 170918/170918/main.cpp | #include <iostream>
#include <time.h>
using namespace std;
// 야구게임 - 3개 숫자 맞추기
int main()
{
srand((unsigned int)time(0));
int answer[3];
for (int i = 0; i < 3; i++)
answer[i] = rand()%10;
int user[3];
int strike, ball;
while (1)
{
cout << "input 3 numbers" << endl << "input : ";
for (int i = 0; i < 3; ... | ALGO | 0.998465 | 3.439491 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-10-09T08:55:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7819e6e918... |
21851f93-3c70-44d1-bf5d-b88db78affc4 | fahim-56/Data-Structure | Module_6_Operation_Of_Linked_List/Insert_Tail.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int value;
Node *next_address;
Node(int value)
{
this->value = value;
next_address = NULL;
}
};
void New_Node_Insert(Node *&head, int v)
{
Node *new_node = new Node(v);
if (head == NULL)
{
head = n... | ALGO | 0.999381 | 3.862506 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2024-10-26T11:27:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9d2d97d58e2... |
3148443d-64cb-437e-b7ea-2b362b99c87c | sayedgkm/ProgrammingContest | Codeforces/Codeforces Round #251 (Div. 2)/E. Devu and Birthday Celebration.cpp | /// Bismillahir-Rahmanir-Rahim
#include <bits/stdc++.h>
#define ll long long int
#define FOR(x,y,z) for(int x=y;x<z;x++)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ... | ALGO | 0.999966 | 4.179772 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2018-02-13T13:42: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": "bd92b337a... |
e26e2ec3-bee1-4f4e-b252-e7bb15682bce | vinhSeo-02/PTIT | KTLT/HOANVI001_LietKeHoanVi.cpp | #include<bits/stdc++.h>
#define FOR(i, a, b) for(int i=a; i<=b; i++)
#define N 1000111
using namespace std;
int n, k;
int a[N];
bool b[N];
int main(){
int t;
cin>>t;
while(t--){
int n, k;
cin >> n >> k;
if(k == 0) {
for(int i = 1; i <= n; i++) {
cout << i << ' ';
... | ALGO | 0.999858 | 3.640814 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2023-02-27T17:57:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ab68894047... |
ae87cf61-0599-4925-a37e-2acf03a9de3a | IgorAugust0/problem-solving | 04-struct-ordenacao/b-odernar-2.cpp | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
// Declaração de variáveis
int t;
cin >> t;
for (int caso = 0; caso < t; caso++) {
// Se não for o primeiro caso, adicione uma linha em branco antes
if (caso > ... | ALGO | 0.998968 | 5.529195 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2025-06-15T14:29: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": "f9b69de5596... |
e73e9087-7dc0-4541-beae-e352cdf34ea2 | navdeep545/DSA | Graph_test.cpp | #include <iostream>
#include <queue>
#include <unordered_map>
using namespace std;
vector<int> MST(int **edges, int n, int e)
{
vector<vector<int>> newedges;
for (int i = 0; i < e; i++)
{
newedges.push_back({edges[i][2], edges[i][0], edges[i][1]});
}
sort(newedges.begin(), newedges.end());
... | ALGO | 0.999852 | 4.509568 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-04-22T17:44: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": "d90369be804d... |
017ab51d-ebcc-4104-93d2-38cc48a9cefa | sophieantoun/CSE305-parallel-shortest-paths | DeltaSteppingSequential.cpp | #include "DeltaSteppingSequential.h"
DeltaSteppingSequential::DeltaSteppingSequential(const Graph& graph, const int source, const double delta, const bool debug)
: graph(graph), source(source), delta(delta), debug(debug),
distances(graph.getNumVertices(), std::numeric_limits<double>::infinity()),
pred... | ALGO | 0.999599 | 5.963669 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2024-05-28T16:26: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": "8a9ab8b4538... |
969a35a4-8f50-4b2f-afa6-2ce3784b7a4c | kenii28/CS-2134 | Data Structures and Algorithms/hw3.A.cpp | /*
<NAME>
data structures and algorithms
hw3a
*/
#include <iostream>
#include <string>
#include <vector>
using namespace std;
template <typename Object>
class Vector
{
public:
explicit Vector(int initSize = 0)
: theSize{ initSize }, theCapacity{ initSize + SPARE_CAPACITY }
{
objects = new Object[theCapacity];
}... | TOOL | 0.990339 | 6.135578 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-02-19T17:41: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": "b3b69924e1... |
54c7ba21-dfb4-487f-b8d3-fca161a12b73 | MominRifat/Codeforces_Problems_Solutions | 991B.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int tc;
cin >> tc;
while (tc--)
{
int n;
cin >> n;
vector<int> arr(n);
long long oddsum = 0;
long long evensum = 0;
int odd = 0;
int even = 0;
for (int i = 0; i < n; i++)
{
... | ALGO | 0.999803 | 4.899241 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-11-13T16:59:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5ee892d8dea... |
80a7521e-01c3-4b7b-aadf-6ca6cd27eab0 | chae-y/coding_test_practices | 9th/6(1).cpp | #include<iostream>
using namespace std;
int N,M;
int cost[10];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> N;
int mincost = 51;
int mini;
for (int i = 0; i < N; i++) {
int temp;
cin >> temp;
cost[i] = temp;
if (temp <= mincost) {
mincost = temp;
mini = ... | ALGO | 0.999996 | 3.440001 | {
"github_metadata": {
"branch": "master",
"commit_count": 247,
"repo_created_at": "2020-12-21T14:28:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2ba55449... |
409b4729-47b6-44d4-b17e-5a9b12365a53 | kitanovskiviktor/OOP | Second Midterm Exercises/e_9.cpp | Да се имплементира класа Trud во која се чуваат информации за: (5 поени)
вид на труд (еден знак и тоа C за конференциски труд, J за труд во списание)
година на издавање (цел број).
Да се имплементира класа Student во која се чува: (5 поени)
името на студентот (низа од најмногу 30 карактери)
индекс (цел број)
година н... | TOOL | 0.908164 | 4.427421 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-06-12T18:31:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "50dab4761267... |
2b74f93d-08d2-4716-8892-6bb0bb3101a6 | winnochan/learn | oj/leetcode/cpp/01329.sort-the-matrix-diagonally/solution.cpp | // Created by WinnoChan at 2024/04/29 13:10
// leetgo: 1.4.5
// https://leetcode.cn/problems/sort-the-matrix-diagonally/
#include <bits/stdc++.h>
#include "LC_IO.h"
using namespace std;
// @lc code=begin
class Solution {
public:
vector<vector<int>> diagonalSort(vector<vector<int>>& mat) {
int m = mat.siz... | ALGO | 0.999987 | 6.201679 | {
"github_metadata": {
"branch": "main",
"commit_count": 257,
"repo_created_at": "2017-11-24T04:31: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": "d79d68bd7b... |
f1221669-42e0-4ccc-ac39-f12a6a00182e | kifah-s/Fundamentals_Of_Programming | Gammal_Tech_Academy/Core_Courses/2_C++_Programming_Language/Les_50_C++_Reference/Exercises_2/Pro_2_Swaps_Values_Using_Pointers_Program/Swaps_Values_Using_Pointers_Program_V1.cpp |
//* Swaps Values Using Pointers Program (Version 1).
/*
* Write a program that swaps the values of two integers using pointers.
! Output:
! Befor Swap: x = 5, y = 10
! After Swap: x = 10, y = 5
*/
#include <iostream>
#include <array>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <... | ALGO | 0.999476 | 5.786186 | {
"github_metadata": {
"branch": "main",
"commit_count": 2110,
"repo_created_at": "2023-04-07T14:22: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": "850b8eece... |
5cb0b24c-0c90-49bc-a234-0d7a73d36a75 | sryanyuan/cpp11_practise | practise/src/leetcode/number_of_boomerangs.h | #ifndef _INC_NUMBER_OF_BOOMERANGS_
#define _INC_NUMBER_OF_BOOMERANGS_
#include <unordered_map>
using std::unordered_map;
#include <vector>
using std::vector;
using std::pair;
class NumberOfBoomerange {
public:
static int main(vector<pair<int, int>>& points) {
if (points.size() <= 2) {
return 0... | ALGO | 0.998855 | 5.398175 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2018-05-17T09:57: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": "cf66b0c21... |
36a9619e-ecdf-4f8a-a75e-0d5d95068cf7 | zaneyang123/csp | DP/Luogu/P1719.cpp | #include<bits/stdc++.h>
using namespace std;
int n, a[150][150], value[150][150], maxn = INT_MIN;
int main()
{
cin >> n;
for(int i = 1; i <= n; i++)
{
for(int j = 1;j <= n; j++)
{
cin >> a[i][j]; //输入
}
}
for(int i = 1;i <= n; i++)
{
for(int j ... | ALGO | 0.99996 | 3.154978 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2022-12-19T01:44: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": "f858d46ed0... |
11b41766-f00b-400f-912d-9dd88643d773 | oysiya/OnlineJudge | Codeground/03_Study.cpp | // 아래 기본 제공된 코드를 수정 또는 삭제하고 본인이 코드를 사용하셔도 됩니다.
#include <stdio.h>
#include <algorithm>
using namespace std;
int ary[200000];
int main(void) {
/* 아래 freopen 함수는 input.txt를 read only 형식으로 열고, 표준입력(키보드) 대신 input.txt 로 부터 읽어오겠다는 의미의 코드입니다.
만약 본인 PC 에서 테스트 할 때는, 입력값을 input.txt에 저장한 후 freopen 함수를 사용하면
그 아래에서 scanf 함수를 ... | ALGO | 0.999825 | 3.838219 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-05-28T12:49: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": "e094ceb9b6... |
ee57cd54-65d1-4590-b960-220fd31a461b | edisonhello/OnlineJudge | CodeForces/689c.cpp | #include <bits/stdc++.h>
using namespace std;
long long m;
long long check(long long);
int main() {
cin >> m;
long long d = 1LL, ans = 0;
while (d <= 10000000000000000LL) d <<= 1;
while (d >>= 1) if (ans + d <= 10000000000000000LL) if (check(ans + d) < m) ans += d;
++ans;
if (check(ans) != m) cout << "-1... | ALGO | 0.999971 | 3.418569 | {
"github_metadata": {
"branch": "master",
"commit_count": 151,
"repo_created_at": "2017-11-03T13:41: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": "ff4bf5f9... |
00b2bb59-0df4-4c57-bf74-bba77d2bb5c9 | ishandutta2007/codeforces-d | dmga44/normal/1365/F.cpp | #include <bits/stdc++.h>
#define db(x) cout << (x) << '\n';
#define all(v) (v).begin(),(v).end()
#define allr(v) (v).rbegin(),(v).rend()
#define f first
#define s second
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pii;
typedef pair<double,ll> pdi;
typedef pair<double,pii> pdp;... | ALGO | 0.999964 | 4.520093 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31: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": "e8df65d2365f... |
f4cc0503-1580-4867-b04d-556ed922cae7 | ethz-asl/kalibr | aslam_cv/aslam_cameras/include/aslam/cameras/implementation/PinholeProjection.hpp | #include <opencv2/core/eigen.hpp>
#include <Eigen/StdVector>
#include <iostream>
#include <cstdlib>
namespace aslam {
namespace cameras {
template<typename DISTORTION_T>
PinholeProjection<DISTORTION_T>::PinholeProjection()
: _fu(0.0),
_fv(0.0),
_cu(0.0),
_cv(0.0),
_ru(0),
_rv(0) {
... | ALGO | 0.918614 | 6.754689 | {
"github_metadata": {
"branch": "master",
"commit_count": 359,
"repo_created_at": "2014-05-29T12:31:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4839,
"forks": 1450,
"issues": 101,
"pull_requests": 17
},
"file_meta": {
"content_id": "... |
7e9851ac-3e5c-4af4-aae7-f5eb15e92e12 | Haroxgaming/Dijkstra_Mathis | Source.cpp | #include "Node.h"
#include <queue>
#include <limits>
#include <unordered_map>
struct NodeInfo {
int distance;
Node* predecessor;
};
vector<pair<int, int>> dijkstraStepByStep(vector<Node*>& graph, Node* source, Node* end) {
unordered_map<Node*, NodeInfo> nodeInfoMap;
for (auto& node : graph) {
... | ALGO | 0.999973 | 4.524153 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-23T12:42: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": "ed249a49715e... |
6d94c85f-2da9-455f-ac45-29ab9cba7a3a | SBU-YCX/LeetCode | Hard/2127 Maximum Employees to Be Invited to a Meeting/2127.cpp | // Topic : 2127. Maximum Employees to Be Invited to a Meeting (https://leetcode.com/problems/maximum-employees-to-be-invited-to-a-meeting/)
// Author : YCX (https://github.com/SBU-YCX/LeetCode/tree/main/Hard/2127%20Maximum%20Employees%20to%20Be%20Invited%20to%20a%20Meeting)
// Time : O(N)
// Space : O(... | ALGO | 0.999963 | 5.403485 | {
"github_metadata": {
"branch": "main",
"commit_count": 597,
"repo_created_at": "2021-10-03T19:53: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": "e10c1d1a49... |
c9fce6d9-1d2c-40c6-ba92-db70cb42e9e6 | Eugeniosales/data-structures-algorithms-c | Contest/UFMG-02-2020/graus.cpp | #include <bits/stdc++.h>
using namespace std;
void bfs(vector<int>graph[], int size, int st) {
map <int, bool> marked;
map <int, int> level;
queue <int> q;
for(int i = 0; i < size; i++) marked[i+1] = false;
q.push(st);
marked[st] = true;
level[st] = 0;
while(!q.empty()) {
... | ALGO | 0.999931 | 4.432034 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2020-01-05T22:29: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": "d88ee0e27... |
82a601a3-2e2a-4620-a3ca-e1ac07a6c1bc | Benicia2005/DATA-STRUCTURE | 50.cpp | #include <stdio.h>
int main() {
int n;
// Get the number of terms from the user
printf("Enter the number of Fibonacci terms: ");
scanf("%d", &n);
// First two terms of the series
int firstTerm = 0, secondTerm = 1,i;
// Display the first two terms
printf("Fibonacci Series: %d %d ", fi... | ALGO | 0.999744 | 4.057039 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-11-27T03:48: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": "677fa364b2e5... |
3c002b54-67fb-4928-a6a0-0f1d736fb0c3 | ishandutta2007/codeforces-d | demoralizer/normal/665/E.cpp | #include "bits/stdc++.h"
using namespace std;
// #define int long long
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define all(x) (x).begin(),(x).end()
#define uniq(v) (v).erase(unique(... | ALGO | 0.999983 | 4.164333 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31: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": "1f4b5638bd91... |
28c1a2d6-595c-457c-9e6f-d1b2e65326e6 | shetty-nithin/DSA_450 | Stack & Queue/289_Largest_Rectangular_Area_in_Histogram.cpp | /*
Find the largest rectangular area possible in a given histogram where
the largest rectangle can be made of a number of contiguous bars.
For simplicity, assume that all bars have the same width and the width
is 1 unit, there will be N bars height of each bar will be given by the
array arr.
Link : https://practic... | ALGO | 0.999784 | 6.204443 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2022-03-28T17:13: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": "747284ff3... |
08e58882-3ad3-4c73-8ffc-61d99fd05d69 | shafasyahii/Praktikum-Struktur-Data-Assignment | MODUL 8 - Queue/unguided2.cpp | #include <iostream>
#include <string>
using namespace std;
// Node structure for linked list implementation
struct Node {
string NamaMahasiswa;
string NIMMahasiswa;
Node* next;
};
class Queue {
public:
Queue() {
front = rear = nullptr;
}
bool isEmpty() {
return front == nullp... | ALGO | 0.999656 | 5.132223 | {
"github_metadata": {
"branch": "main",
"commit_count": 144,
"repo_created_at": "2024-03-10T14:06: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": "369f402a59... |
bf10a0ba-e4e7-4c2a-a555-00a2a454a47b | ssonsonya/SolveBaekjoon | SolveBaekjoon/1937_HungryPanda/HungryPanda.cpp | #include "stdafx.h"
#include "HungryPanda.h"
#include <iostream>
using namespace std;
HungryPanda::HungryPanda()
{
cout << "\n 예제 :\n4\n14 9 12 10\n1 11 5 4\n7 15 2 13\n6 3 16 8";
cout << "\n\n 입력 :\n";
Answer();
}
static int n;
static int forest[500][500];
static int dp[500][500];
static int dX[4] = { -1,1,0,0... | ALGO | 0.999993 | 4.442363 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2023-07-18T19:45: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": "65cb63b03... |
4454d95c-52dd-4fe6-932e-fac56c6c9b35 | GauravUpreti893/LeetCode | Prime List - GFG/prime-list.cpp | //{ Driver Code Starts
//Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
class Node{
public:
int val;
Node *next;
Node(int num){
val=num;
next=NULL;
}
};
// } Driver Code Ends
//User function Template for C++
/*
class Node{
public:
int val;
Node *next... | ALGO | 0.999887 | 4.810446 | {
"github_metadata": {
"branch": "main",
"commit_count": 4576,
"repo_created_at": "2022-02-01T16:25:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14327256b... |
0675059f-a384-42ff-89e8-cba04a4f3451 | HITS-MBM/gromacs-fda | api/nblib/listed_forces/kernels.hpp | /*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2020,2021, 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... | ALGO | 0.957066 | 6.241396 | {
"github_metadata": {
"branch": "release-2021-fda",
"commit_count": 19869,
"repo_created_at": "2015-05-22T13:48:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 34,
"forks": 12,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_i... |
b5d48279-27e1-42cd-afd4-3d941fd66939 | nohc2001/ALL_Utillity | ALL_Utillity/main.cpp | #include <iostream>
#include <time.h>
#include "Utill_VirtualUnit.h"
using namespace virtu_unit;
//지금 4~40 바이트 사이즈의 메모리 할당이 참 느린데 이건 FM_Model1에서 lifecheck가 체크하는 바이트를 늘려서 극복가능할 것 같음.
//어딘가에 비용함수가 있었음.
constexpr int fmsize = 100000; //100 KB
freemem::FM_Model0 fm;
void CircuitInit() {
fm.SetHeapData(new byte8[fmsize]... | TOOL | 0.969072 | 3.671356 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2023-02-01T01:49:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7ab4ac8ede3... |
cb026bb0-9c94-4e24-b0dc-f99042bb0d44 | mariogrieco/Estructura-de-Datos | Sort/selectionSort.h | #ifndef _SELECTION_SORT_H_
#define _SELECTION_SORT_H_
#ifndef _SWAPING_H_
#define _SWAPING_H_
template <typename T> void swa(T &a, T &b) {
T Aux;
Aux = a;
a = b;
b = Aux;
}
#endif
// NOTA README !! ( BIDIRECCIONAL ! ~SHAKER )
/*
Selecion (Selection sort)
BIg ... | ALGO | 0.999815 | 4.635367 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2017-02-18T04:20:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0076dd33e... |
11392a3c-22dd-4dc1-9133-56eaba6ec7fd | ydb-platform/ydb | ydb/library/actors/core/harmonizer/harmonizer.cpp | #include "harmonizer.h"
#include "history.h"
#include "pool.h"
#include "waiting_stats.h"
#include "cpu_consumption.h"
#include "shared_info.h"
#include "debug.h"
#include <ydb/library/actors/core/executor_pool.h>
#include <ydb/library/actors/core/executor_thread_ctx.h>
#include <ydb/library/actors/core/executor_threa... | ALGO | 0.948409 | 6.491215 | {
"github_metadata": {
"branch": "main",
"commit_count": 35208,
"repo_created_at": "2022-02-07T14:52:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4512,
"forks": 701,
"issues": 2263,
"pull_requests": 682
},
"file_meta": {
"content_id": ... |
d1d2471e-303e-4c96-9d0d-27328ebcdd3a | aaqsr/CCC | practice test/S3 - Musab/S3 - Musab/S3 - Musab.cpp | #include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
int r;
unordered_map<int, int> rFreq;
vector<int> max = {};
vector<int> prevMax = {};
for (int i = 0; i < n; i++) {
cin >> r;
rFreq[r] += 1;
if (max.size()==0 || rFreq[r] > rFreq... | ALGO | 0.999972 | 3.927924 | {
"github_metadata": {
"branch": "main",
"commit_count": 213,
"repo_created_at": "2022-02-01T18:20:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5b09f18e6b... |
611216f4-c98a-44c0-9d39-40c4675c5e2e | leducphuclong/code | Competitive Programming/all/letter-combinations-of-a-phone-number.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define nln '\n'
class Solution {
map<char, string> phone_key;
public:
void recurs(vector<string> &sav, string digits, int idx, string cur) {
if (idx == digits.size()) {
if (cur.empty() == false)
sav.push... | ALGO | 0.999952 | 5.36488 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2024-02-22T10:27: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": "18271e003c... |
45381458-d258-47e9-9711-4c5c6badd120 | apple/turicreate | src/external/boost/boost_1_68_0/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2014 <NAME>, Amsterdam, the Netherlands.
// Copyright (c) 2008-2014 <NAME>, Paris, France.
// Copyright (c) 2009-2014 <NAME>, London, UK.
// Copyright (c) 2013-2014 <NAME>, Lodz, Poland.
// This file was modified by Oracle on 2013-2017.
// Mo... | ALGO | 0.998114 | 6.927275 | {
"github_metadata": {
"branch": "main",
"commit_count": 1571,
"repo_created_at": "2017-12-01T00:42:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11198,
"forks": 1137,
"issues": 502,
"pull_requests": 21
},
"file_meta": {
"content_id": "... |
f7cf9aa1-d538-46e9-96a8-a8d4b188143b | ishandutta2007/codeforces-e | emthrm/normal/1548/A.cpp | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,m,n) for(int i=(m);i<(n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
using ll = long long;
constexpr int INF = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr double EPS = 1e-8;
constex... | ALGO | 0.998845 | 4.685903 | {
"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": "f76842f82480... |
5ec7e337-f355-47d8-9858-fc2e9da9cec3 | ishandutta2007/codeforces-c | catupper/normal/768/C.cpp | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long Int;
Int a, cnt[1080];
Int tmp[1080], n, k, x;
int main(){
cin >> n >> k >> x;
for(int i = 0;i < n;i++){
cin >> a;
cnt[a]++;
}
while(k--){
int parity = 0;
for(int i = 0;i < 1024;i++){
if(cnt[i]... | ALGO | 0.99989 | 3.629053 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:17:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "77d95d1ea893... |
2328752e-6462-4a65-87b3-fe73dff1e53f | lukewhite32/Advent-of-Code | 2023/6/day6pt1.cpp | #include <iostream>
#include <fstream>
#include <vector>
int calculateDistanceTravelled(int buttonTime, int raceTime) {
int ret = 0;
for (int x = buttonTime; x < raceTime; x ++) {
ret += buttonTime;
}
return ret;
}
std::vector<int> parseValues(std::string s) {
std::vector<int> ret;
std... | ALGO | 0.99957 | 4.207191 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2022-12-02T23:04: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": "a9fea40307c... |
ec280569-435f-4422-b606-75972e92ff00 | romeorizzi/portafoglioVoti_public | Algoritmi/2022-07-26/all-CMS-submissions-2022-07-26/20220726T122444.VR474723.incr_subseq_with_drops.cpp | /**
* user: VR474723
* fname: MARCELLO
* lname: <NAME>
* task: esameincr_subseq_with_drops
* score: 40.0
* date: 2022-07-26 12:24:44.787643
*/
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>
#include <list>
using namespace std;
int g,n,k;
int max_seq(int*,int,int);
int find_max_seq(int ... | ALGO | 0.999954 | 3.562612 | {
"github_metadata": {
"branch": "master",
"commit_count": 139,
"repo_created_at": "2020-06-21T22:16:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b31b37f9... |
cddd9ba3-be69-483d-ab99-7fcfd5b297e1 | InsightSoftwareConsortium/ITK | Modules/Filtering/Path/src/itkChainCodePath2D.cxx | /*=========================================================================
*
* Copyright NumFOCUS
*
* 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
*
* https://www.apache.o... | TOOL | 0.93333 | 5.912012 | {
"github_metadata": {
"branch": "main",
"commit_count": 57165,
"repo_created_at": "2010-07-27T15:48:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1517,
"forks": 701,
"issues": 268,
"pull_requests": 49
},
"file_meta": {
"content_id": "6... |
c9db6aa1-fb22-4df8-8087-c065946407ee | Kapiura/AdvancedCpp | List5/task1.cpp | #include <iostream>
#include <memory>
template<typename T>
class BTS
{
private:
struct Node
{
T data;
std::unique_ptr<Node> left;
std::unique_ptr<Node> right;
Node* parent;
Node(T data, Node* parent=nullptr):data(data), parent(parent){};
};
std::unique_ptr<N... | ALGO | 0.935905 | 4.950205 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2024-10-06T17:32: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": "969f1409355... |
48dcd92c-828e-4c0b-a228-47034f8c15c5 | akshaykumar-hiran/BlindDSA-75 | Graphs/Check_Bipitrate_graph.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
// Function to check if the graph is bipartite
bool isBipartite(int V, const vector<vector<int>> &adj)
{
vector<int> color(V, -1); // Array to store colors of the vertices
// Check for each component of the graph
for (int start = ... | ALGO | 0.99983 | 6.694206 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2024-10-13T17:58: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": "0b3c6cc615... |
9db186f9-96b4-4753-bb50-f673f7c3891a | ishandutta2007/codeforces-w | wiwiho/normal/1325/C.cpp | //#define NDEBUG
#include <bits/stdc++.h>
#include <bits/extc++.h>
#define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define iter(a) a.begin(), a.end()
#define riter(a) a.rbegin(), a.rend()
#define lsort(a) sort(iter(a))
#define gsort(a) sort(riter(a))
#define mp(a, b) make_pair(a, b)... | ALGO | 0.99966 | 4.026101 | {
"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": "c7c8008ccbcd... |
3509054b-1f09-45f2-930c-fe8c9e173261 | bnuzhanyu/GCJ | GCJ2017/Round1B/A.cc | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <unordered_set>
#include <unordered_map>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <functional>
#include <cmath>
#include <string.h>
using namespace std;
using ull = unsigned long long;
using ll = long ... | ALGO | 0.999785 | 3.717031 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2017-02-27T14:45: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": "1db3f72f6... |
54c83e9f-ccfd-4e66-bde2-e72f3c1b3be3 | EleganckaPorazka/PQPIKS | src/DynamicModel.cpp | #include "PQPIKS/DynamicModel.h"
namespace PQPIKS
{
DynamicModel::DynamicModel( int DOF, const MatrixD &AllRotAxes, const MatrixD &Masses, const MatrixD &AllFirstMomentsOfMass, const MatrixD &AllInertias, const MatrixD &Gravity ) : DOF(DOF), AllRotAxes(AllRotAxes), Masses(Masses), AllFirstMomentsOfMass(AllFirstMoment... | ALGO | 0.964814 | 6.103749 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-04-08T10:35:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a92d6be906d... |
8166cab7-4e0f-4eed-a176-74ad8bb778da | zxn64/pre-summer-trainning | graph theory/C.cpp | #include <iostream>
#include <deque>
#include <vector>
#include <cstring>
struct edge {
int x, y;
bool w;
};
using namespace std;
const int max_n = 502;
int dis[max_n][max_n];
bool vis[max_n][max_n];
vector<edge> edges[max_n][max_n];
void io() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.... | ALGO | 0.999977 | 3.785527 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2022-04-14T10:34: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": "a46033f66c0... |
b5588fec-aac5-414d-ad45-17ed8f52bc85 | Inria-Empenn/Anima-Public | Anima/registration/svf-operations/animaSVFLieBracketImageFilter.h | #pragma once
#include <itkImageToImageFilter.h>
namespace anima
{
/**
* @brief Computes the Lie bracket between two fields u and v as expressed by Bossa et al.
*
* There is a discrepancy in between Vercauteren et al. and Bossa et al. formulation. This Lie bracket implements the
* Vercauteren et al. formulation
... | ALGO | 0.980342 | 7.469064 | {
"github_metadata": {
"branch": "master",
"commit_count": 1295,
"repo_created_at": "2015-05-07T08:15:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 40,
"forks": 34,
"issues": 3,
"pull_requests": 3
},
"file_meta": {
"content_id": "d70712... |
5501031b-57e6-429e-89fd-10a9cdf7309c | omosan0627/library | orthogonalization.cpp | #include <bits/stdc++.h>
#define ADD(a, b) a = (a + (ll)b) % mod
#define MUL(a, b) a = (a * (ll)b) % mod
#define MAX(a, b) a = max(a, b)
#define MIN(a, b) a = min(a, b)
#define rep(i, a, b) for(int i = (a); i < (b); i++)
#define rer(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define all(a) (a).begin(), (a).end()
#def... | ALGO | 0.999932 | 3.42721 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2017-10-29T14:24: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": "f69927561... |
58ce04f0-4ff3-425f-b42d-978479c0b539 | lnkkerst/XCPC-templates | src/ds-tree/bst/treap/fhq_treap_range_reverse.cpp | #pragma GCC optimize(2)
#include <algorithm>
#include <array>
#include <bitset>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
// ANCHO... | ALGO | 0.999994 | 4.674555 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2023-05-20T08:42:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb4966a567f... |
c0589427-b08c-46ea-a185-9ff430c4e278 | dejanapivac/Primeagen-AlgoCourse | BinaryTree/16_BTBreadthFirstSearch.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
struct BinaryNode {
int value;
BinaryNode *left, *right;
BinaryNode(int v) {
value = v;
left = right = nullptr;
}
};
bool bfs(BinaryNode *head, int needle) {
queue<BinaryNode *> q;
q.push(head);
w... | ALGO | 0.999987 | 5.492214 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2023-10-05T20:03: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": "0bbf20bb14e... |
b1e31c91-0dc0-44f6-a22f-aeaa0e9692ac | dishank1112/CP_Grind | C_Ball_in_Berland.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
#define ll long long
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define pii pair<int, int>
#define vi vector<int>
#define vpii vector<pii>
#define F first
#define S second
#define rep(i, a, b) for (int i =... | ALGO | 0.999937 | 3.61828 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2025-02-11T05:13: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": "ec800eedc76e... |
8d5a1851-4e39-44e5-8816-6b2f22eed20e | emilakper/adm-mag | coursework/main.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <locale.h>
using namespace std;
const int number_towns = 25;
const int true_length = 1711;
vector <vector <int> > graph(number_towns, vector <int>(number_towns));
// считывание графа
void ReadGraph() {
ifstream fin;
fin.open("di... | ALGO | 0.999903 | 4.284759 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2024-02-10T11:28: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": "7a4c83e0ef3... |
8ed6971f-4037-444f-a225-ebf21a03415a | plash3/Vocabulary | word.cpp | #include "word.h"
namespace graph {
namespace word {
/**
Check if edit distance between two words is 1. Edit distance of 1
between word w1 and word w2 means that w1 can be obtained from w2
by a single character deletion / insertion / substitution.
*/
bool is_edit_distance_one (const string& s, const string& t) ... | ALGO | 0.997837 | 5.119503 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-02-26T02:29: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": "68bef76250... |
4958cf15-7b83-4b2a-a791-c3560d876eee | nishant-neo/Coding-Grounds | 4. InterviewBit/Linked Lists/MergeTwoSortedList.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
ListNode* Solution::mergeTwoLists(ListNode* A, ListNode* B) {
ListNode* t1 = A;
ListNode* t2 = B;
ListNode* t3;
ListNode* C = NULL;
while( t... | ALGO | 0.999969 | 5.379118 | {
"github_metadata": {
"branch": "master",
"commit_count": 224,
"repo_created_at": "2016-11-19T18:42: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": "0dfb8af1... |
6dcf3520-d4d5-42a0-a6a5-29d8abcf4eb8 | SeonggukPark/CodeTree | 250407/루돌프의 반란/rudolph-rebellion.cpp | /*
* 삼성 SW 역량테스트 2023 하반기 오후 1번 문제 / 루돌프의 반란 (L14)
* Date: 2025-04-07 (월)
* Duration: 2h 2m
*/
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <set>
#include <vector>
#include <algorithm>
#include <queue>
#include <numeric>
#include <iomanip>
#include <cmath>
#define endl '\n'
#define INF 987654321... | ALGO | 0.999955 | 4.617134 | {
"github_metadata": {
"branch": "main",
"commit_count": 316,
"repo_created_at": "2024-03-19T16:03: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": "7bda34f7f8... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.