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 |
|---|---|---|---|---|---|---|---|
a4fbfcab-e0a6-4239-857a-216b9b288e5a | luizacostam/graph-theory-algorithms | euleriangraph.cpp | /*
Euler Circuit:
i) Starts and ends at the same node
ii) Every edge must be visited only once
Euler Graph: a graph having a euler circuit
i) All edges in a graph must be presented in a single component
ii) All other components should not have any edge and therefore shoud be of size 1-vertex only
... | ALGO | 0.999813 | 5.155406 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-04-05T21:52: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": "f7bf98afed23... |
55991797-52c6-4733-84f4-921ff440c621 | WDelot/Lab4 | Lab4/Lab4.cpp | #include <iostream>
#include <fstream>
#include <cmath>
#include <Windows.h>
using namespace std;
class Shape {
public:
virtual void printInfo() const = 0;
virtual double getArea() const = 0;
};
class Circle : public Shape {
protected:
double radius;
public:
Circle(double r) : radius(r) {}
double ge... | TOOL | 0.9523 | 4.649117 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-10-17T05:57: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": "e381d175ac... |
6febcdd3-228b-48bb-8467-519325326f99 | juniors719/QXD-ED | aulas/setembro/aula_04-09/ponto.cpp | #include <iostream>
using namespace std;
struct Ponto
{
float x;
float y;
};
void troca(Ponto *p1, Ponto *p2) {
Ponto aux = *p1;
*p1 = *p2;
*p2 = aux;
}
void dobra(Ponto *p1, Ponto *p2) {
p1->x *= p1->x;
p1->y *= p1->y;
p2->x *= p2->x;
p2->y *= p2->y;
}
int main() {
Ponto p,... | ALGO | 0.998965 | 5.33698 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2023-08-29T11: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": "ad77d39d0... |
6f4d159c-f9b6-473b-ae84-8f6276e5e28a | WilliamLCobb/iNDS | desmume/src/android/7z/CPP/Windows/FileFind.cpp | // Windows/FileFind.cpp
#include "StdAfx.h"
#include "FileFind.h"
#include "../Common/StringConvert.h"
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#ifdef HAVE_LSTAT
extern "C"
{
int global_use_lstat=1; // default behaviour : p7zip stores symlinks instead of dumping the files they point to
}
#endif... | TOOL | 0.917493 | 6.195421 | {
"github_metadata": {
"branch": "master",
"commit_count": 213,
"repo_created_at": "2015-11-18T16:26:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 236,
"forks": 58,
"issues": 153,
"pull_requests": 6
},
"file_meta": {
"content_id": "872... |
6ab3efae-7bdb-4e61-9666-458742d4dfba | shivamS21/Competitive_Programming | 1721B.cpp | #include <bits/stdc++.h>
using namespace std;typedef long long ll;
#define FAST_FURIER ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define sorta(v) sort(v.begin(), v.end())
#define sortd(v) sort(v.begin(), v.end(), comp)
#define M 1000000007
#define ll long long
bool comp(ll x, ll y){
r... | ALGO | 0.99993 | 4.345586 | {
"github_metadata": {
"branch": "main",
"commit_count": 122,
"repo_created_at": "2021-04-16T06:12:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "574af6c31d... |
b152eed7-e9ad-41cb-8f65-9ffadf51b9a1 | BadAccuracyID/expert-potato | D3/CH3 v4/CH3Var4_T142.cpp | #include <stdio.h>
int main() {
int tinggi, lebar, columnPlaced;
scanf("%d %d %d", &tinggi, &lebar, &columnPlaced);
int matrix[tinggi][lebar];
for (int i = 0; i < tinggi; i++) {
for (int j = 0; j < lebar; j++) {
scanf("%d", &matrix[i][j]);
}
}
int totalPoints = 0;
... | ALGO | 0.999876 | 3.70966 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-12-26T05:11: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": "1e16318ead... |
57c5ce09-ea93-40a9-8a75-098ae2bf75d1 | mihaican/Advent-of-Code-2020 | day14.cpp | /*#include <bits/stdc++.h>
using namespace std;
ifstream fin("aoc14.in");
long long len,value,sum;
long long mem[70000];
string type,sgn;
pair<int,bool> mask[40];
int main(){
while(fin>>type){
if(type.find("mask")!=string::npos){
memset(mask,35,0);
fin>>sgn>>type;
len=1;
... | ALGO | 0.998178 | 4.521784 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2020-12-11T18:08:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d04cd5cbc60... |
29add9e2-3c72-4291-a6a3-cd5143396cdd | anmolaman20/competitive_programming_ | LINKEDLIST_USING_STL/implementation.cpp | #include <bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node* next;
node(int v)
{
data = v;
next = NULL;
}
};
void insertAtTail(node* &head,int data)
{
node *n = new node(data);
if(head==NULL)
{
head = n;
... | ALGO | 0.999829 | 4.545728 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2021-10-29T16:32: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": "e2f819a173... |
c2fb1993-5204-4b63-a941-242acca663c5 | peer42/squares-in-disk | ivarp/include/ivarp/math_fn/eval/if_then_else.hpp | // The code is open source under the MIT license.
// Copyright 2019-2020, <NAME>, TU Braunschweig, Algorithms Group
// https://ibr.cs.tu-bs.de/alg
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// th... | TOOL | 0.997749 | 7.460706 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2020-04-09T14:32: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": "fc0287aea... |
5521b446-3b49-44a5-ae2f-916f77b8ea39 | wrobcio789/leetcode-problems | 2767-ways-to-express-an-integer-as-sum-of-powers.cpp | #include <vector>
#include <cstdint>
#include <iostream>
#include <algorithm>
static const int MODULO = 1e9 + 7;
class Solution {
public:
int numberOfWays(int n, int x) {
std::vector<int> numberOfWays(n + 1);
numberOfWays[0] = 1;
for (int max = 1; max <= n; max++) {
c... | ALGO | 0.999956 | 5.948671 | {
"github_metadata": {
"branch": "master",
"commit_count": 283,
"repo_created_at": "2025-06-01T12:24: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": "ddb6ef88... |
d8e7a81f-4b1a-44cc-b036-30ac37b68ed5 | YooJaeJun/PS-Algorithm- | 백준/Silver/15658. 연산자 끼워넣기 (2)/연산자 끼워넣기 (2).cc | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int n;
vector<int> arr, ans;
enum eOperator {
eplus, eminus, emultiple, edivision
};
void bt(int depth, vector<int>& oper, int result) { // +,-,x,/ 수
if (depth == n) {
ans.push_back(result);
return;
}
for (int i = 0; i != 4; i+... | ALGO | 0.999925 | 3.784141 | {
"github_metadata": {
"branch": "main",
"commit_count": 1235,
"repo_created_at": "2022-03-15T14:18:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "429103c91... |
47994e60-0533-45d7-b3bb-bebf52bf069e | Alfredo-Renteria/1337 | SlidingWindow_2Ptr/Medium/Subarr_Product_Less_Than_K.cpp | /**
* <NAME>
* Leetcode Problem #713: Subarray Product Less Than K
* Algorithm Level 2 - Medium
* @Topics: Array, Sliding Window
* @Time: O(n) @Space: O(1)
* Where n is the size of nums
*/
#include <iostream>
#include <vector>
//Sliding Window
int numSubarrayProductLessThanK(std::vector<int>& nums, int k) {
const... | ALGO | 0.99993 | 6.440968 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-12-09T08:35: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": "ca17e0b57de... |
8ead4555-0dd2-4d18-a861-8e701c131a91 | AngelKitty/review_the_national_post-graduate_entrance_examination | books_and_notes/professional_courses/data_structures_and_algorithms/sources/cpp_code/course_code/src/majority/main.cpp | /******************************************************************************************
* Data Structures in C++
* ISBN: 7-302-33064-6 & 7-302-33065-3 & 7-302-29652-2 & 7-302-26883-3
* <NAME>, <EMAIL>
* Computer Science & Technology, Tsinghua University
* Copyright (c) 2006-2013. All rights reserved.
********... | ALGO | 0.998438 | 4.552317 | {
"github_metadata": {
"branch": "master",
"commit_count": 242,
"repo_created_at": "2019-03-30T09:23:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1026,
"forks": 205,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "a73... |
864d8be0-c8ed-4f24-8aae-7ea854ffea18 | dccatmeow/leetcode | P438.cpp | /*
Given two strings s and p, return an array of all the start indices of p's anagrams in s. You may return the answer in any order.
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.
Example 1:
Input: s = "cbaebabacd... | ALGO | 0.999962 | 6.659371 | {
"github_metadata": {
"branch": "main",
"commit_count": 421,
"repo_created_at": "2022-02-20T20:53: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": "ee34622e98... |
9b56d139-9494-4b75-8935-7c47b404c32d | godotengine/godot | thirdparty/embree/kernels/common/stack_item.h | // Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "default.h"
namespace embree
{
/*! An item on the stack holds the node ID and distance of that node. */
template<typename T>
struct __aligned(16) StackItemT
{
/*! assert that the xchg function works */
... | ALGO | 0.919509 | 5.533785 | {
"github_metadata": {
"branch": "master",
"commit_count": 76043,
"repo_created_at": "2014-01-04T16:05:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 98972,
"forks": 22820,
"issues": 5000,
"pull_requests": 3866
},
"file_meta": {
"content... |
2cc49bea-fa96-46b7-9715-9ead6fef2592 | FreeZ77R/Labyrinthe-Cpp | projet-COO/gtk.hpp | #pragma once
#include <gtkmm.h>
#include "graph.hpp"
using namespace std;
// La classe MazeWindow hérite de Window pour utiliser ces méthodes
class MazeWindow : public Gtk::Window {
protected:
int nbRows; // Nombre de ligne dans le labyrinthe
int nbColumns; // Nombre de colonnes dans le labyrinthe
vecto... | ALGO | 0.941371 | 4.065804 | {
"github_metadata": {
"branch": "main",
"commit_count": 85,
"repo_created_at": "2023-05-09T13:56: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": "f681433e7a9... |
5d8fabfc-d0a6-4d0b-9211-a02d864d7196 | Bartleby2718/UVa-OJ-Solutions-in-CPP | 10664/main.cpp | #include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
bool canBePartitioned(const vector<int>& weights)
{
int n = weights.size();
int total = 0;
for (int weight:weights)
{
total += weight;
}
if (total % 2 != 0)
{
return false;
}... | ALGO | 0.999606 | 5.436474 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2019-05-14T01:19:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea530bb89... |
cfed9b50-55b1-49dc-96e4-5444aa78a755 | foolnotion/advent-of-code | source/2015/12/solution.cpp | #include <aoc.hpp>
#include <nlohmann/json.hpp>
template<>
auto advent2015::day12() -> result {
using json = nlohmann::json;
std::ifstream f("./source/2015/12/input.txt");
json data = json::parse(f);
auto contains_red = [](json const& obj) -> bool {
return obj.is_object() && std::ranges::any_... | ALGO | 0.988128 | 5.632642 | {
"github_metadata": {
"branch": "master",
"commit_count": 250,
"repo_created_at": "2022-11-13T19:54:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4bc569... |
b400538e-bda3-49de-9ba0-1d88d8db5c1a | shishir474/Dsa | Codeforces/CSES/Graphs/18. RoadPreparation.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; // policy based data structure
// ordered_set i... | ALGO | 0.999964 | 4.810947 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2022-07-06T16:38: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": "c497e07f5... |
5cdfaf97-7ed7-4c43-a406-7f58f0d96dea | ProtossGenius/cppweb | impl_request.cpp | #include "impl_request.h"
#include "icelog.h"
#include "str_utils.h"
namespace sureice {
namespace impl {
int impl_request::parseURIAndProto(Method m, const std::string &str) {
auto inp = trim(str);
if (inp.size() == 0) {
return -1;
}
auto url_proto = split_2(inp, " ");
auto &uri = url_proto[0];
auto... | WEB | 0.918574 | 5.701303 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-02-28T09:53: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": "30d2c324d6f1... |
358696df-58ff-453f-a1a0-befb993bfa1f | HPCSYSPROS/Workshop20 | Application_performance_in_frontera_acceptance_process/artifacts/namd/code/NAMD_2.12_Source/src/eabf.h | //
// The extended adaptive biasing force method has been contributed to NAMD by the following authors:
//
// <NAME> and <NAME>
// Laboratoire International Associ\'e
// Centre National de la Recherche Scientifique et University of Illinois at Urbana--Champaign
// Unit\'e Mixte de Recherche No. 7565, Univer... | TOOL | 0.902648 | 5.823917 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2020-12-10T22:00:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bbea02ee4c... |
c93bf9f3-0989-47a1-9602-bb5f28cf6d47 | cmacuna7/ESTRUCTURA-DE-DATOS-CD | Parcial 3/recurrencia/factorialRecursivo.cpp | #include <iostream>
#include <chrono>
#include <graphics.h>
using namespace std;
// Función recursiva para calcular el factorial de un número
int factorial(int n)
{
if (n == 0 || n == 1)
return 1;
return n * factorial(n - 1);
}
void plotFactorial(int num)
{
int gd = DETECT, gm;
char driver[]... | ALGO | 0.983799 | 5.700832 | {
"github_metadata": {
"branch": "main",
"commit_count": 148,
"repo_created_at": "2024-11-06T17:52: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": "f0891e9c66... |
353452b0-3a8e-498b-a7ac-0e8d8c22c130 | georgiee/lip-sync-lpc | sources/praat/fon/Sound_to_Formant.cpp | /* Sound_to_Formant.cpp
*
* Copyright (C) 1992-2011 <NAME>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
... | ALGO | 0.993989 | 4.977836 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2012-09-12T12:44:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 21,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f0c7e2b86... |
a887c4dd-0334-47b6-b25f-50fd5a7b20bb | aozora18/UVDI6 | UVDI152022/prj/ItfcCalc/object/LeastSquare.cpp | /*
desc : Least Square Method (https://www.investopedia.com/terms/l/least-squares-method.asp)
y = A + Bx (least squares method)
*/
#include "pch.h"
#include "LeastSquare.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static CHAR THIS_FILE[] = __FILE__;
#endif
/*
desc : Constructor
parm : None
retn : ... | ALGO | 0.999623 | 5.115451 | {
"github_metadata": {
"branch": "main",
"commit_count": 343,
"repo_created_at": "2024-02-19T07:17:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "09b928cb59... |
30b51340-9257-4c0b-8ff6-69c725af5ebb | Amandev02/Gitcode | Stickler Thief - GFG/stickler-thief.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
// } Driver Code Ends
class Solution
{
public:
//Function to find the maximum money the thief can get.
int func(int i,int arr[], vector<int> &dp){
if(i<0) return 0;
if(i==0) return arr[0];
... | ALGO | 0.999888 | 5.721293 | {
"github_metadata": {
"branch": "main",
"commit_count": 541,
"repo_created_at": "2022-08-08T15:07:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "22add5e9ef... |
30db9924-2e28-40a4-9e3b-e62d8e88b81f | Ragnar20-03/Logic-Building | program485.cpp | #include<iostream>
using namespace std;
template <class T>
class ArrayX
{
public:
T *Arr;
int iSize;
ArrayX(int);
~ArrayX();
void Accept();
void Display();
void BubbleSort();
};
template <class T>
ArrayX<T>:: ArrayX(int iNo)
{
this->iSize = iNo;
thi... | ALGO | 0.9997 | 4.52946 | {
"github_metadata": {
"branch": "main",
"commit_count": 167,
"repo_created_at": "2023-04-18T13:27: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": "3614bb184c... |
b917d250-49ee-47f0-b83b-dc3b455d4762 | JustAG7/Competitive_Programming | Others/ClaOJ/ClaOJ_Charity_Marathon_2023/CSES - School Dance.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define pf push_front
#define db double
#define X first
#define Y second
#define fast ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL);
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define... | ALGO | 0.999992 | 3.522218 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2023-05-11T10:56: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": "98fb9d0b2... |
34877e93-1094-4205-90e3-205af2cec8be | 99-wood/cal | cal.ino | #include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
typedef Adafruit_SSD1306 Screen;
#define BLACK SSD1306_BLACK
#define WHITE SSD1306_WHITE
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for SS... | TOOL | 0.925104 | 4.407787 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-03-10T08:31: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": "4271c4c3624c... |
8c77b68c-9523-4b35-9578-870f754f8729 | dawsboss/COSC320 | Lab08/main.cpp | #include "BinaryTree.h"
#include <chrono>//chrono
#include "Logger.h"
//Takes a sorting algorithm calls it and prints it's meta data
double TimeI = 0;
double TimeS = 0;
double TimeR = 0;
void timeFuncInsert(BinaryTree , int k);
void timeFuncRemove(BinaryTree , int k);
void timeFuncSearch(BinaryTree , int k);
int ... | TEST | 0.981135 | 4.510674 | {
"github_metadata": {
"branch": "master",
"commit_count": 104,
"repo_created_at": "2020-02-14T18:33: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": "8e6cf3af... |
e9f40612-4502-4c57-bf04-8eada4c4200f | CEED/libCEED | include/ceed/jit-source/magma/magma-basis-weight-1d.h | // Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors.
// All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
//
// SPDX-License-Identifier: BSD-2-Clause
//
// This file is part of CEED: http://github.com/ceed
/// @file
/// Internal header for MAGMA... | ALGO | 0.998161 | 4.815584 | {
"github_metadata": {
"branch": "main",
"commit_count": 5514,
"repo_created_at": "2017-12-06T17:57:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 231,
"forks": 57,
"issues": 41,
"pull_requests": 18
},
"file_meta": {
"content_id": "1f0cb... |
b497a628-eb93-4b9b-b80c-0ed3fa027a61 | LupulescuAlexandru/Variante-INFO | V16 - 2009/V16S3E3 - Luchian.cpp | #include <iostream>
using namespace std;
/*
Scrieţi definiţia completă a subprogramului multiplu care are 3 parametri:
a, prin care primeşte un tablou unidimensional cu maximum 100 de numere naturale mai mici decât 1000,
n, numărul efectiv de elemente ale tabloului
şi k, un nu... | ALGO | 0.996706 | 4.505233 | {
"github_metadata": {
"branch": "master",
"commit_count": 144,
"repo_created_at": "2019-03-15T17:26: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": "6f1af004... |
7d17bab0-58d0-452a-a28b-61d96cdccfb5 | Gaire-Jeevan/recursion | 12_maze_path.cpp | #include <stdio.h>
int maze(int cr, int cc, int er, int ec){
int rightWays = 0; // to avoid garbage value
int downWays = 0;
if(cc==ec && cr==er){
return 1;
}
if (cr==er) {// only rightWays call
rightWays += maze(cr,cc+1,er,ec);
}
if(cc==ec){// only downWays call
... | ALGO | 0.999974 | 4.283297 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-01-04T16:47: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": "686062537a5f... |
d02b9da0-28a5-4ae0-a5cf-baf9e397ac7d | vinayak-7/DSA | Distinct occurrences - GFG/distinct-occurrences.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
/*You are required to complete this method*/
class Solution
{
int mod = 1e9+7;
public:
// int count(int i , int j , string& s1 , string& s2,vector<vector<int>> &dp)
// {
// if(j < 0) return 1;
// ... | ALGO | 0.999974 | 6.156551 | {
"github_metadata": {
"branch": "main",
"commit_count": 1878,
"repo_created_at": "2023-01-12T15:35: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": "604ccd143... |
2484cd27-8950-4d29-aa79-2142613feb05 | ArseniyKholod/stce_ss24_ex12 | thirdParty/dcl6i38ngl_v381/examples/gt2s_ga1s_cp_loop_rec/driver.cpp | /**
dco/c++ v3.8.1
-- Algorithmic Differentiation by Operator Overloading in C++
COPYRIGHT 2022
The Numerical Algorithms Group Limited and
Software and Tools for Computational Engineering @ RWTH Aachen University
This file is part of dco/c++.
**/
#include <iostream>
#include <cmath>
#include "dco.hpp"
using nam... | ALGO | 0.986441 | 6.552775 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2024-05-28T11:17:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3bc3b6b5efc... |
c0690d6a-6915-455c-b2dc-a3fe3fd998c0 | ElMassimo/automatic-music-transcription | FFTW++/tconv.cc | #include "Complex.h"
#include "convolution.h"
#include "utils.h"
using namespace std;
using namespace fftwpp;
// g++ -g -O3 -DNDEBUG -fomit-frame-pointer -fstrict-aliasing -ffast-math -msse2 -mfpmath=sse conv.cc fftw++.cc -lfftw3 -march=native
// icpc -O3 -ansi-alias -malign-double -fp-model fast=2 conv.cc fftw++.cc... | ALGO | 0.999171 | 5.373597 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2015-04-03T16:46:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f536bea45... |
ab982776-6ab3-4d83-826d-a4a4d8cfc918 | mu9x/cs577splay | cs577 stars/constellation.cpp | #include <iostream>
#include <vector>
#include <queue>
#include "EasyBMP.h"
#include "EasyBMP_Geometry.h"
#include "EasyBMP_Font.h"
using namespace std;
const int MAX_EDGE = 100;
const int MAX_NODE = 100;
typedef struct{
int pixel_height;
int pixel_width;
char *name;
}Pictureinfo;
typedef struct{
int v;
int... | ALGO | 0.992972 | 3.71833 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2013-05-12T02:04: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": "e39f35c353... |
d478c776-5985-4b41-92e1-a97a9f13b15d | mr3coi/algorithm_solutions | 190614_clocksync/src.cpp | #include <iostream>
#include <limits>
#include <string>
#include <vector>
#define NUM_CLOCKS 16
#define NUM_SWITCHES 10
#define FAIL 31
#define MIN(x,y) ((x) <= (y) ? (x) : (y))
using namespace std;
vector<vector<int>> each_switch = {
{0, 1, 2},
{3, 7, 9, 11},
{4, 10, 14, 15},
{0, 4, 5, 6, 7},
{6, 7, 8, 10, 12}... | ALGO | 0.999106 | 3.748998 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2019-06-13T01:42: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": "8114f71d5... |
895253d1-1f1c-4144-84f9-bab5ffad081a | renatocf/MAC0315-EP1 | src/transport/Transport.cpp | /**********************************************************************/
/* Copyright 2014 RCF */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file... | ALGO | 0.999054 | 5.868995 | {
"github_metadata": {
"branch": "master",
"commit_count": 103,
"repo_created_at": "2014-06-06T22:19: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": "daaa256a... |
baadde3c-471b-4bb4-b094-1cffe2150670 | johnathan79717/competitive-programming | CodeChef/JAN14/QSET/main.cc | #include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <stack>
#include <deque>
#include <list>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <cassert>
#inc... | ALGO | 0.99992 | 3.959309 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2016-04-07T07:50:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2f184e1d8... |
fb0f861f-fc32-43f6-a32a-046f643cc5d6 | Soumithra-DNS/Problem_Solving | Codeforces/2024B.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
void solve()
{
int n, k;
cin >> n >> k;
vector<int> arr(n);
for (int i = 0; i < n; i++)
{
cin >> arr[i];
}
sort(arr.begin(), arr.end());
int cnt = 0;
int ans = 0;
for (int i = 0; i < n; i++)
{
... | ALGO | 0.999974 | 4.651383 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-12-31T19:17: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": "3b009a944860... |
f9594628-c89c-4851-bb3c-be6bd8f72e8d | tyler-travis/ECE6460_Homework0 | src/main.cpp | // Author: <NAME>
// Email: <EMAIL>
// A#: A01519795
#include "AVL_tree/avl.h"
#include <iostream>
#include <string>
void printMenu();
int main(int argc, char** argv)
{
int choice;
AVL tree;
std::ofstream fileOut("Travis-A01519795.txt");
tree.setFileOut("Travis-A01519795.txt");
std::string fileName;
int... | ALGO | 0.990322 | 4.476048 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2015-09-02T13:49: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": "615e5c3e7... |
36be86d7-a407-42cc-851f-ad102ddec521 | lballabio/QuantLib | ql/methods/finitedifferences/solvers/fdm3dimsolver.cpp | /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2011 <NAME>
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modif... | ALGO | 0.99789 | 7.235095 | {
"github_metadata": {
"branch": "master",
"commit_count": 17543,
"repo_created_at": "2015-12-17T16:29:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6151,
"forks": 1964,
"issues": 51,
"pull_requests": 11
},
"file_meta": {
"content_id":... |
78cc3b72-37e5-4432-887a-0fcbe4bcc000 | chimec153/DirectX11-2D-Game | GameEngine/Include/Component/Navigation2D.cpp | #include "Navigation2D.h"
#include "../Tile/TileMap.h"
#include "../Tile/Tile.h"
#include "../Object/Obj.h"
#ifdef _DEBUG
#include "../Input.h"
#endif
CNavigation2D::CNavigation2D() :
m_pMap(nullptr)
#ifdef _DEBUG
, m_pPrevTile(nullptr)
, m_pPrevMouseTile(nullptr)
#endif
{
m_eType = COMPONENT_TYPE::CT_OBJECT;
}
C... | TOOL | 0.930543 | 5.419966 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2020-09-12T18:13: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": "5d2a1285bc... |
4df83643-eb48-4359-a0cf-ae46a4161746 | rimba5446/Project-C-_-- | cek_tahun_kabisat.cpp | #include <iostream>
using namespace std;
int tahun_kabisat (int tahun){
return tahun % 400 == 0;
}
int tahun_nonkabisat (int tahun){
return tahun % 100 == 0;
}
int tahun_kabisat2 (int tahun){
return tahun % 4 == 0;
}
int main()
{
cout <<" =============================" <<endl;
cout <<... | ALGO | 0.999668 | 4.090252 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-07-09T13:02:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "35a916868bcc... |
185b5723-be24-4649-a452-698171ae3d85 | gobirds08/Leetcode-Solutions | SubstringWithConcatenationOfAllWords.cpp | #include <vector>
#include <string>
#include <unordered_map>
class Solution {
public:
std::vector<int> findSubstring(std::string s, std::vector<std::string>& words) {
std::vector<int> output;
if (words.empty() || s.empty()) {
return output;
}
... | ALGO | 0.99988 | 6.221963 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2025-02-19T01:47: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": "1ffe829dae3... |
819009ca-0142-453f-b477-d96482628411 | whquddn55/Algorithm_BojSolves | 2000/2961.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template<typename a, typename b>
ostream& operator<<(ostream& os, const pair<a, b>& pai) {
os << pai.first << ' ' << pai.second;
return os;
}
template<typename a, typename b>
istream& operator>>... | ALGO | 0.999974 | 3.821645 | {
"github_metadata": {
"branch": "master",
"commit_count": 1298,
"repo_created_at": "2021-03-10T14:27: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": "31f1bc4... |
fb1a4880-e5b2-4ef9-aefd-6a0e2a219857 | gwkdgwkd/leetcode | c_c++/graph/union-find/面试题1707婴儿名字.cpp | /*
每年,政府都会公布一万个最常见的婴儿名字和它们出现的频率,也就是同名婴儿的数量。
有些名字有多种拼法,例如,John和Jon本质上是相同的名字,但被当成了两个名字公布出来。
给定两个列表,一个是名字及对应的频率,另一个是本质相同的名字对。
设计一个算法打印出每个真实名字的实际频率。
注意,如果John和Jon相同,Jon和Johnny相同,则John与Johnny也相同,即有传递和对称性。
在结果列表中,选择字典序最小的名字作为真实名字。
示例:
输入:names = ["John(15)","Jon(12)","Chris(13)",
"Kris(4)","Christopher(19)"],
... | ALGO | 0.999581 | 5.128094 | {
"github_metadata": {
"branch": "master",
"commit_count": 266,
"repo_created_at": "2019-11-27T11:32: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": "0d25f758... |
1d6852e9-72c4-43cb-a543-b0314a98dc26 | Nagendra-Chowdary/DSA | 63_BT_probs/checkSum.cpp | #include<iostream>
#include<queue>
using namespace std;
//check for two sum tree.
//a node data should be equal to the sum of its below nodes.
//recursion
class node{
public:
int data;
node* left;
node* right;
node(int d){
this->data=d;
this->left=NULL;
this->right=NULL;
}
};
node* b... | ALGO | 0.999851 | 3.974072 | {
"github_metadata": {
"branch": "main",
"commit_count": 197,
"repo_created_at": "2024-10-18T05:20:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "32a9fcaa54... |
faab2440-5362-4bfe-a283-6466e4d61efd | matthaberbusch/manipulative-arm | irb120_accomodation_control/src/freeze_mode_accommodation_controller.cpp | //Updated 10/15/2019
//<NAME>, <NAME>, and <NAME>
//subscribers to a 'virtual attractor' pose
//Performs accommodation control
// ROS: include libraries
#include <irb120_accomodation_control/irb120_accomodation_control.h>
#include <irb120_accomodation_control/freeze_service.h>
#include <irb120_accomodation_control/set... | ALGO | 0.965127 | 4.888162 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2018-09-17T15:52:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "388750170... |
923fcd1d-536d-46b9-99be-0691773e7fac | Arteeem4ik/Geometry | geometry/src/polygon.cpp | #include "../polygon.h"
#include "../segment.h"
#include "../vector.h"
namespace geometry {
Polygon::Polygon() = default;
Polygon::Polygon(std::vector<Point> points) : points_(points), num_points_(points.size()) {
}
Polygon& Polygon::Move(const Vector& vector) {
for (size_t i = 0; i < num_points_; ++i) {
point... | TOOL | 0.932764 | 6.462657 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-01-24T23:24: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": "14b49b385e32... |
794368c2-e38f-468c-958b-e4884121d57c | KailasMahavarkar/interview-prep | Neetcode 150/two_pointers/trapping_rain_water_leetcode_42.cpp | #include <algorithm>
#include <climits>
#include <iostream>
#include <vector>
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
/*
Problem Link : https://leetcode.com/problems/trapping-rain-water/description/
Company Tags : None
Youtube Link : None
Custom Link : None
Similaritie... | ALGO | 0.99999 | 6.383933 | {
"github_metadata": {
"branch": "master",
"commit_count": 219,
"repo_created_at": "2023-02-21T13:25: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": "c37c97ca... |
6b442d93-a289-4817-9f63-07d940e96384 | Min-03/Algorithm | 02/2024_02_06/2468.cpp | #include <bits/stdc++.h>
#define FastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
int graph[100][100];
bool visited[100][100];
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int n;
void bfs(int sx, int sy) {
queue<pair<int, int>> q;
q.push({sx, sy});
visited[sx][... | ALGO | 0.999876 | 4.434188 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-12-20T03:58: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": "f9b3a77b30bd... |
01fb9214-4acd-4e02-9063-6d28008ffd03 | b4ich3v/DSA_FMI | Seminars/Seminar. 06/pathSum.cpp | #include <vector>
#include <iostream>
#include <queue>
struct TreeNode
{
int val;
TreeNode* left;
TreeNode* right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode* left, TreeNode* right) : val(x), left(l... | ALGO | 0.99998 | 5.492394 | {
"github_metadata": {
"branch": "main",
"commit_count": 645,
"repo_created_at": "2024-10-05T20:39:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3279ec629b... |
cd40d8dc-91b0-4b2f-ae61-5725f7ff611e | GRTLCollaboration/Chombo | lib/src/EBTools/EBNormalizeByVolumeFraction.H | #ifdef CH_LANG_CC
/*
* _______ __
* / ___/ / ___ __ _ / / ___
* / /__/ _ \/ _ \/ V \/ _ \/ _ \
* \___/_//_/\___/_/_/_/_.__/\___/
* Please refer to Copyright.txt, in Chombo's root directory.
*/
#endif
#ifndef _EBNORMALIZEBYVOLUMEFRACTION_H_
#define _EBNORMALIZEBYVOLUMEFRACTION_... | ALGO | 0.990991 | 6.000013 | {
"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": "f7fde40550... |
7a2863ca-85a4-43b6-9af6-1aa69446d326 | kmjp/procon | codeforce/edu/081-120/114/f.cpp | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define ... | ALGO | 0.999942 | 4.009113 | {
"github_metadata": {
"branch": "master",
"commit_count": 3966,
"repo_created_at": "2015-02-15T11:25:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "e61d2a... |
2ed42317-cf93-4331-8977-7e5442e8cf0d | i-sushant/CP | DynamicProgramming/GridDp/elephant_ways.cpp | #include <bits/stdc++.h>
using namespace std;
int dp[5][5];
void solve()
{
dp[0][0] = 1;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (i == 0 && j == 0)
continue;
int sum = 0;
for (int k = 0; k <= i; k++) {
sum += dp[k... | ALGO | 0.999985 | 3.881189 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-05-17T18:39: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": "953a86337b... |
fe9a6fed-f97d-46d4-89eb-d883e9f64bd4 | Vivek3072/Theory-Questions-gfg-dsa | 15.Tree/Balanced tree/BalancedTree.cpp | #include <iostream>
#include <queue>
using namespace std;
class TreeNode{
public:
int key;
TreeNode *left, *right;
TreeNode(int val){
left = NULL;
right = NULL;
key = val;
}
int height(TreeNode *node){
if (node == NULL)
return 0;
int leftHeight =... | ALGO | 0.999807 | 4.581006 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2022-11-04T14:53: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": "4584ab831... |
c0c05cef-461e-42a4-908f-5bec7ed268ee | aecio/RI-TP1 | src/search/CombinedIndexSearcher.h | /*
* CombinedIndexSearcher.h
*
* Created on: 27/04/2011
* Author: aecio
*/
#ifndef COMBINEDINDEXSEARCHER_H_
#define COMBINEDINDEXSEARCHER_H_
#include <algorithm>
#include <cmath>
#include <string>
#include <time.h>
#include <vector>
#include <queue>
#include "index/Pair.h"
#include "index/Vocabulary.h"
#in... | ALGO | 0.989653 | 6.094906 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2011-04-15T01:00: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": "cefa1b5b8... |
903063be-44fa-4744-bca0-0f2ea28c481a | wataken44/topcoder | work/src/LargestSubsequence.cpp | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <ut... | ALGO | 0.9996 | 4.124565 | {
"github_metadata": {
"branch": "master",
"commit_count": 134,
"repo_created_at": "2011-02-14T14:02:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f2ebc5a6... |
40e5f182-d369-495f-8f38-aa395c915a5b | ldy9037/knou-computer-science-assignment | CPP프로그래밍/중간과제/답안/2.MaxValue/MaxValue.cpp | #include <iostream>
using namespace std;
int main() {
int data[10] = {10, 23, 5, 9, 22, 48, 12, 10, 55, 31};
int max = data[0]; //data의 첫 번째 데이터를 max로 가정함
cout << "데이터 : " << data[0]; // 0번 데이터 출력
for ( int i = 1; i <= 9; i++ ) { // 나머지 9개의 데이터 비교
cout << " " << data[i]; /... | ALGO | 0.99888 | 3.998335 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2024-06-04T06:36:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0e496e910... |
d3d8b5e5-0dc2-4886-809f-dbc5ab9d90df | gopoma/competitive-programming | events/archive/Problemset/1797A.cpp | #pragma GCC optimize(3,"Ofast","inline")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
#define MACRO(code) do {code} while (false)
#define DBG(x) MACRO(cerr << #x << " ... | ALGO | 0.999806 | 4.935062 | {
"github_metadata": {
"branch": "main",
"commit_count": 821,
"repo_created_at": "2023-08-11T20:58: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": "66f5e0f055... |
12f7c999-5b2a-47b3-bdee-16b64fe59bf9 | ShreyashRajBamrara/MyPractice | Theory_classes/Theory11_Double_Linked_List.cpp | #include <iostream>
using namespace std;
struct node
{
struct node *next;
int info;
struct node *prev;
};
node *insert_from_start(node *head, node **tail, int value)
{
node *temp = new node;
temp->next = NULL;
temp->info = value;
temp->prev = NULL;
if (head == NULL && *tail == NULL)
... | ALGO | 0.999882 | 4.448445 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-05-29T14:42: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": "4deb3dd1e51e... |
12e2299b-0533-4bcd-a608-69a74f6a1a86 | AndreeaDraghici/DataSecurity | AutokeyCipher/AutokeyCipher/Autokey.cpp | #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>
using namespace std;
/**
* Author: <NAME>
* Date: 24.12.2022
* Autokey Cipher
**/
#define TEXT_SIZE 26
#define A 65
int initTable(char table[TEXT_SIZE][TEXT_SIZE]);
void copy(char* dest, char* src, int len);
int encrypt(char* cheie, char* sursa,... | ALGO | 0.999928 | 4.050506 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2022-12-18T16:48:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1171db0cb95... |
e48d3fba-90c9-41e4-bc90-8621389f6c86 | sgiLuBao/OSMTSSA | osmt-th-pso-de-abc-ga-ma-bea/osmt-th-ga2/GetMutation1.cpp | void GetMutation1(int cur)
{
double w=rand()/(RAND_MAX+1.0); //产生随机数,小于w_now则变异
int p1,p2,m1,m2,t,j;
double f1=0,f2=0;
// printf("%lf %lf\n",w,w_now);
if(w<w_now)
{
p1=(int)((rand()/(RAND_MAX+1.0))*(vertice-1))+1;//随机选取两个要变异的边
p2=(int)((rand()/(RAND_MAX+1.0))*(vertice-1))+1;
while(p1==p2)
p2=(int)((r... | ALGO | 0.999926 | 3.246989 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2022-11-13T03:16:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "60b4011899d... |
37d4d1c3-7282-4836-a8a0-67c47d42538f | zchbb/Algorithms | Search a 2D matrix II/divide-and-conquer.cpp | // 根据主定理,时间复杂度为 Ω(log(mn)) ~ O((mn)^(3/4)) (worst case)
class Solution {
private:
bool inArea(vector<vector<int> >& matrix, int target, int x1, int y1, int x2, int y2){
if (x1 > x2 || y1 > y2) return false;
if (matrix[y1][x1] == target || matrix[y2][x2] == target) return true;
if (x1==x2 &&... | ALGO | 0.999967 | 5.641197 | {
"github_metadata": {
"branch": "master",
"commit_count": 104,
"repo_created_at": "2017-06-11T16:50:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9ec5d66f... |
11abca62-c2df-4781-9234-049d7965156a | idegn/playground | junk/01-31-160938.cpp | //atcoder arc 5 b
#include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
#include <cstdio>
using namespace std;
#define all(vec) (vec).begin(),(vec).end()
#define ll long long
#define MP make_pair
#define rep(i,n) REP(i,0,n)
#d... | ALGO | 0.999132 | 3.30152 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-04-10T01: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": "508a9aa38b... |
c1cbdd30-5551-430f-a44e-261ff18d7b8d | Manzood/CodeForces | Combined/Goodbye-2022/C/C.cpp | #include "bits/stdc++.h"
#ifdef local
#include "custom/debugger.h"
#else
#define debug(...) 42;
#endif
using namespace std;
#define int long long
void solve([[maybe_unused]] int test) {
int n;
scanf("%lld", &n);
vector<int> a(n);
set<int> nums;
bool ans = true;
for (int i = 0; i < n; i++) {
... | ALGO | 0.999535 | 4.308299 | {
"github_metadata": {
"branch": "master",
"commit_count": 323,
"repo_created_at": "2020-02-23T15:45:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5b85c07e... |
f751d41d-12d2-4968-a965-25ad82c454de | kimmk6845/Baekjoon | Sorting/QuickSort(퀵정렬).cpp | #include <iostream>
#include <random>
#include <chrono>
using namespace std;
#define MAX 15000
void QuickSort(int* a, int l, int r)
{
int temp;
// 배열 a[]의 부분 배열 a[l:r]을 오름차순으로 정렬
if (r > l)
{
int v = a[r]; // 가장 오른쪽 원소 피봇
int i = l - 1; // 좌에서 우로 움직이는 포인터
int j = r; // 우에서 좌로 ...
while (1)
{
do {
... | ALGO | 0.999563 | 4.749599 | {
"github_metadata": {
"branch": "main",
"commit_count": 195,
"repo_created_at": "2021-12-10T11:44:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a6a9e43de... |
f4fad187-ca18-433e-8c8a-b2a9c97edc5e | VOLP1/JogoDaVelha | velha.cpp | #include <iostream>
#include "velha.hpp"
using namespace std;
//Funcao principal
int VerificaVelha(int velha[3][3]){
//Se o jogo for possivel, retorna quem ganhou, ou se foi empate.
if(!jogoimpossivel(velha)){
return vencedor(velha);
}
return -2;
}
//Determina se o jogo e im... | ALGO | 0.998823 | 3.96379 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-09-20T23:22: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": "da424054e92... |
3bd4bb56-cff8-4184-b79f-b6c87f11e813 | emilyinure/haven-tf2 | haven-tf2/movement_simulate.cpp | #include "movement_simulate.h"
#include "player_manager.h"
#include "movement.h"
#include "math.h"
#include <cmath>
#define COORD_FRACTIONAL_BITS 5
#define COORD_DENOMINATOR (1 << (COORD_FRACTIONAL_BITS))
#define COORD_RESOLUTION (1.0f / (COORD_DENOMINATOR))
#define DIST_EPSILON (0.03125f)
vector c_movement... | ALGO | 0.993761 | 3.089639 | {
"github_metadata": {
"branch": "main",
"commit_count": 149,
"repo_created_at": "2022-10-05T00:28:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 41,
"forks": 17,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "e980a7db... |
8fee70ce-4e39-407f-a842-699871786944 | drowland341/CS300 | Source.cpp | //============================================================================
// Name : CS300Project2.cpp
// Author : <NAME>
// Version : 1.0
//============================================================================
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#incl... | TOOL | 0.994167 | 6.614701 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-06-23T03:26: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": "a7f7382da77c... |
eaa63680-58c8-4528-8c72-c05e6d912316 | Sandi2156/TLE-Eliminators-Level-2-Problems | 10-sliding-window/10_set_or_decrease.cpp | #include <bits/stdc++.h> // This will work only for g++ compiler.
#define for0(i, n) for (int i = 0; i < (int)(n); ++i) // 0 based indexing
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i) // 1 based indexing
#define forc(i, l, r) for (int i = (int)(l); i <= (int)(r); ++i) // closed interver from l to r r inclu... | ALGO | 0.999952 | 4.495078 | {
"github_metadata": {
"branch": "main",
"commit_count": 134,
"repo_created_at": "2024-12-10T16:16:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "44914271e3... |
a512dc8f-45ec-4a4e-b1e1-014c1a332444 | asidhu/phys-game | PhysicsForDummies/PhysicsEngine/Source/PhysEngine.cpp | #include "PhysEngine.h"
#include "sort.h"
#include "shape.h"
#include <cmath>
#include "BodyDef.h"
#include "solver.h"
#define max(a,b) ((a>b)?a:b)
#define min(a,b) ((a<b)?a:b)
body* PhysEngine::buildBody(bodydef &def){
body *b = new body();
b->position = def.position;
box* c = new box();
c->halfwidth = def.width/2... | ALGO | 0.970335 | 3.658793 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2014-02-12T06:59:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 13,
"pull_requests": 0
},
"file_meta": {
"content_id": "f73f653d... |
1beccd70-ff05-476d-bc23-0edbd5e0acb8 | ritishjaiswal20/DSA-practice | 4 Sum.cpp | #include <iostream>
#include<bits/stdc++.h>
using namespace std;
vector<vector<int>> foursum(vector<int> a,int target)
{
int n=a.size();
int y;
vector<vector<int>>ans;
sort(a.begin(),a.end());
int sum=0;
for(int i=0;i<n;i++)
{
for(int j=i+1;j<n;j++)
{
int front=j+1... | ALGO | 0.999763 | 4.479985 | {
"github_metadata": {
"branch": "main",
"commit_count": 173,
"repo_created_at": "2022-01-19T08:04:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7df545521a... |
3c89b0f5-2a83-437c-bff2-389ab1af7cd5 | fogsail/solution-to-ICPC | chapter6/Ideal-Path/Ideal-Path/main.cpp | //
// main.cpp
// Ideal-Path
//
// Created by <NAME> on 2018/8/10.
// Copyright © 2018年 <NAME>. All rights reserved.
//
#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
const int maxn = 100010;
const int INF = 1000000000;
struc... | ALGO | 0.999977 | 4.36227 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-05-27T07:23:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "abd3b3d28a... |
bd21010f-ef5e-4e95-83a9-8f90e79903f3 | LautaroLasorsa/Mis-problemas--My-Problems | Construyendo Pueblos/Solución Oficial de Construyendo Pueblos/pueblos.cpp | #include <bits/stdc++.h>
using namespace std;
struct Nodo{
int prox[10];
long long val;
Nodo()
{
memset(prox,-1,sizeof(prox)); /// Llena todas las posiciones de prox con el valor -1
val = 0;
}
};
const int largo = 2000000;
int gN, gM;
Nodo Trie[largo];
int tsize = 1;/// Largo actual... | ALGO | 0.999923 | 4.212765 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-02-10T03:48:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c4acc1b4bbd... |
16f7b957-d495-48af-b463-4290302a50cc | FNCRosse/PUCP-2024-1 | ALGORITMIA Y ED/EVALUACIONES PASADAS/Lab 1/Lab1 2019-2P1(Predecesores).cpp | #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
void CargarBin(int num,int *croma){
int i=0,resto;
while(num>0){
resto = num%2;
num = num/2;
croma[i]=resto;
i++;
}
}
struct Proyecto{
int Num;
int Costo;
int Ganancia;
int Prdecesores[5];
int CantPred;
};
int main(){
//Ingr... | ALGO | 0.999979 | 3.598794 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-08-19T14:11: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": "1d1ee8d7e05d... |
61c4ece4-3aab-499d-b28e-1d71366b477d | minkyoe/Algorithm | Baekjoon/9012_괄호.cpp | #include <iostream>
#include <stack>
using namespace std;
int main(void) {
int tc = 0;
cin >> tc;
for (int i = 0; i < tc; i++)
{
string s = "";
cin >> s;
stack<char> st;
string ans = "YES"; // YES이면 유효한 문자열
for(char c : s) {
if (c == '(') {
... | ALGO | 0.999837 | 5.362659 | {
"github_metadata": {
"branch": "master",
"commit_count": 581,
"repo_created_at": "2020-04-03T12:41:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a8aeb40b... |
599d32b7-bf4d-4b7e-89fc-a1a3903ce327 | rajankit911/DS-Algo | Sorting Algorithm/Quicksort/Quicksort II.cpp | #include <bits/stdc++.h>
#define forloop(i,s,e) for(int i=s; i<e; i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
/*last element as pivot*/
void swap(int& a, int& b) {
int temp;
temp = b;
b = a;
a = temp;
}
int partition(int ... | ALGO | 0.99998 | 4.911295 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-01-19T02:59: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": "3dde2fd875... |
a0c75fed-5964-481b-8944-bbe55e138ad8 | priojeetpriyom/competitive-programming | uva/108 Maximum Sum adhoc cumulative .cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, ara[101][101], cumCol[101][101], cumRow[101][101];
//maximal sum uva 108
int main() {
while(scanf("%d", &n)==1) {
for(int i=1; i<=n; i++)
cumCol[i][0] = cumRow[0] [i]=0;
int mx=INT_MIN;
for(int i=1; ... | ALGO | 0.999899 | 3.543263 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-09-19T15:14:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "37528e237... |
ca31f0fa-ae25-4c93-a7ff-216777d685fa | forsyde/DeSyDe | src/validation/validation.hpp | /**
* Copyright (c) 2013-2016, <NAME> <<EMAIL>> *
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above ... | TOOL | 0.962131 | 5.430174 | {
"github_metadata": {
"branch": "master",
"commit_count": 243,
"repo_created_at": "2016-10-05T08:21:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "44ae3877b... |
9f1c7591-fa51-4a64-aedb-4db182ad70c8 | getItemFromBlock/MinecraftCPPOpenGL | Headers/Core/DataStructure/NameSearcher.inl | template<typename T>
std::vector<T*> Core::DataStructure::NameSearcher::SortList(std::vector<SearchResult<T>>& rawVector)
{
std::vector<T*> result;
for (unsigned int i = 0; i < rawVector.size(); i++)
{
for (unsigned int j = i + 1; j < rawVector.size(); j++)
{
if (rawVector[i].weight < rawVector[j].weight)
... | ALGO | 0.995103 | 5.543749 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2022-11-15T15:40:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed87cdcb00e... |
12e5cb27-7014-49ab-8c7d-4f3d6fe2cb2d | fresh-jack/leetcode | algorithms/cpp/list/detectCycle.cpp | // Source : https://leetcode.cn/problems/linked-list-cycle-ii/description/
// Author : <NAME>
// Date : 2023-04-02
// 142
#include "node.h"
#include <unordered_set>
using namespace std;
ListNode *detectCycle(ListNode *head) {
if (head == nullptr || head->next == nullptr) {
return nullptr;
}
List... | ALGO | 0.999629 | 5.369798 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2023-03-27T13:47: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": "56ce231857a... |
76b1f320-21fe-4052-af9f-cbb39e9bdbb4 | zenvite2/DSAA_PTIT | CÂY NHỊ PHÂN HOÀN HẢO.cpp | /*
Cho cây nhị phân, nhiệm vụ của bạn là kiểm tra xem cây nhị phân có phải là một cây hoàn hảo hay không (perfect tree)? Một cây nhị phân được gọi là cây hoàn hảo nếu tất cả các node trung gian của nó đều có hai node con và tất cả các node lá đều có cùng một mức.
Input:
Dòng đầu tiên đưa vào số lượng test T.
Nh... | ALGO | 0.999957 | 5.117747 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2022-05-07T14:31:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "326a9806cfc... |
e50b710b-d47b-4208-9c85-d4efdd4a65fc | laigubiao/bingzhengfengyun | chess.cpp | #include <iostream>
#include "chess.h"
chess::chess()
{
x = 0;
y = 0;
heading = 1;
}
chess::chess(int x, int y, int dir):x(x),y(y),heading(dir){}
chess::chess(int given)
{
x = 0;
y = 0;
heading = given;
}
void chess::walk(const int& h, const int& w, const int& i, std::vector<std::vector<chess*>>& board){}
void ch... | TOOL | 0.933151 | 3.063901 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2025-03-29T10:08: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": "d642a1eebfb... |
c0a2a3fc-8a2c-460e-9b05-dd7425724b4c | CASPER-3/LeetcodeSolutions | Leetcode/longest_increasing_subsequence/longest_increasing_subsequence_1.cxx | /*
300. 最长递增子序列
difficulty: medium
给你一个整数数组 nums ,找到其中最长严格递增子序列的长度。
子序列是由数组派生而来的序列,删除(或不删除)数组中的元素而不改变其余元素的顺序。例如,[3,6,2,7] 是数组 [0,3,1,6,2,2,7] 的子序列。
示例 1:
输入:nums = [10,9,2,5,3,7,101,18]
输出:4
解释:最长递增子序列是 [2,3,7,101],因此长度为 4 。
示例 2:
输入:nums = [0,1,0,3,2,3]
输出:4
示例 3:
输入:nums = [7,7,7,7,7,7,7]
输出:1
提示:
1 <=... | ALGO | 0.999905 | 5.816053 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-03-06T10:30: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": "5304bea087f6... |
6bcad297-dd79-4ca3-9c05-a3fc70d9751a | qcscine/qcmaquis | dmrg/framework/dmrg/utils/parallel/info.hpp | /**
* @file
* @copyright This code is licensed under the 3-clause BSD license.
* Copyright ETH Zurich, Laboratory of Physical Chemistry, Reiher Group.
* See LICENSE.txt for details.
*/
#ifndef UTILS_PARALLEL_INFO_HPP
#define UTILS_PARALLEL_INFO_HPP
namespace parallel {
template<class M... | ALGO | 0.985367 | 4.783709 | {
"github_metadata": {
"branch": "master",
"commit_count": 7892,
"repo_created_at": "2020-10-12T06:28:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 42,
"forks": 15,
"issues": 16,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e7fa... |
959ad051-db7d-454a-b6b2-b5480b2b6584 | TiwariKishan/CSES-Problem-Set | Flight Discount.cpp | /*
Author - <NAME>
Dream bigger. Do bigger.
Wake up with determination. Go to bed with satisfaction.
*/
//Sometimes later becomes never. Do it now.
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i,a,b) for(ll i=a;i<b;i++)
#define mod 1000000000000000000007
#defi... | ALGO | 0.999989 | 4.212911 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2020-08-14T05:42: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": "0808f6188b... |
bfad30c4-8a60-4736-b4b6-a29ae611495c | Kawser-nerd/CLCDSA | Source Codes/CodeJamData/15/04/0.cpp | #include <cstdio>
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long LL;
void win(){
if(1) cout << "RICHARD" << endl;
if(0) cout << "Y ";
}
void lose(){
if(1)cout << "GABRIEL" << endl;
if(0) cout << "N ";
}
main() {
FILE *fin = freopen("D-large.in"... | ALGO | 0.999857 | 3.103888 | {
"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": "e2c13c6f... |
01498aaa-cdb4-43e2-9f37-902dbda7db69 | phzsantos/Starting_from_the_beginning | 02 - Cpp/00 - Arrays.cpp | #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int i, j, m, n;
cout << "Quantos numeros voce vai digitar? ";
cin >> n;
double vetor[n];
for (i = 0; i < n; i++)
{
cout << "Digite um numero: ";
cin >> vetor[i];
}
cout << "NUMEROS DIGITADOS: "... | TOOL | 0.909127 | 3.75621 | {
"github_metadata": {
"branch": "main",
"commit_count": 116,
"repo_created_at": "2021-08-30T14:26: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": "88ea50d448... |
3229247b-886a-4796-b75c-9487b2a762ca | ubsuny/CompPhys | BioPhys/sawalk.cpp | #include "SAWalk.h"
void SAWalk::run() {
walks = 0;
failed_walks = 0;
r2av = 0;
r4av = 0;
stdDev = 0;
// generate walks
while (walks < n_walks) {
sites.clear(); // set of occupied lattice sites
Site s;
s.x = 0;
s.y = 0;
sites.push_back(s);
bool walk_failed = false;
// lo... | ALGO | 0.999607 | 4.776172 | {
"github_metadata": {
"branch": "main",
"commit_count": 229,
"repo_created_at": "2019-07-02T19:00:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 32,
"forks": 39,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a49fee501... |
570b60df-11b9-4f2e-b1ed-14ed10865fd9 | artpixls/ART | rtengine/calc_distort.cc | /**********************************************************************
Finds the N_FEATURES best features in an image, and tracks these
features to the next image. Saves the feature
locations (before and after tracking) to text files and to PPM files,
and prints the features to the screen.
***************************... | ALGO | 0.990493 | 4.623714 | {
"github_metadata": {
"branch": "master",
"commit_count": 10784,
"repo_created_at": "2024-11-28T19:37:11.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 121,
"forks": 5,
"issues": 76,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f32... |
39a0b3bb-103d-4366-8145-287aa7e36916 | pathakshashank17/DSA | Algos/ConvexHull.cpp | #include <bits/stdc++.h>
using namespace std;
int cross(vector<int> &O, vector<int> &A, vector<int> &B) {
return (A[0] - O[0]) * (B[1] - O[1]) - (A[1] - O[1]) * (B[0] - O[0]);
}
vector<vector<int>> getConvexHull(vector<vector<int>> &points) {
int n = points.size(), k = 0;
if (n <= 3)
return point... | ALGO | 0.999993 | 4.674356 | {
"github_metadata": {
"branch": "main",
"commit_count": 85,
"repo_created_at": "2020-08-18T15:07: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": "398d1f67b08... |
bf9d0b30-7437-4690-a4a7-21839ba39d80 | AyanPahari/Must-Do-Coding-Questions-for-Top-Product-Based-Companies | Graph Theory 1/29. Problem.cpp | #include <bits/stdc++.h>
using namespace std;
int n;
char arr[31][31];
int dist[31][31];
bool vis[31][31];
//distance of shortest path from source point to destination using BFS.
// link: https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/practice-problems/algorithm/jungle-run/
bool isValid(in... | ALGO | 0.999952 | 4.807189 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2021-12-28T11:51:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1762ec14b... |
3206d59d-9fc8-43f5-9885-7d079e0f3996 | Alberto-SC/Competitive-Programming-solutions | ICPC contest/Latin america/RPC/2020/4 LHCDP/i.cpp | #include <bits/stdc++.h>
using namespace std;
map<string,set<string>> mp;
int check(set<string> st,string s){
vector<string> v;
v.push_back(s);
for(auto c:st){
v.push_back(c);
}
vector<int> p(v.size(),1);
for(int i = 0;i<v.size();i++){
string current = v[i];
for(int j = ... | ALGO | 0.999997 | 3.515929 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2020-07-20T03:18:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "988e91294286... |
e0057967-d88d-4c97-8d50-0c34262de627 | HarshRaj2717/Programming-Problems | Strivers_A2Z_DSA_sheet/median in row wise sorted matrix.cpp | // Problem : https://practice.geeksforgeeks.org/problems/median-in-a-row-wise-sorted-matrix1527/1?utm_source=youtube&utm_medium=collab_striver_ytdescription&utm_campaign=median-in-a-row-wise-sorted-matrix
// Explanation : Available in notes and also https://youtu.be/63fPPOdIr2c
//{ Driver Code Starts
//Initial templat... | ALGO | 0.99998 | 6.237623 | {
"github_metadata": {
"branch": "master",
"commit_count": 116,
"repo_created_at": "2022-01-16T12:17:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "267f58cc... |
7235f2e8-04f6-4eab-8e11-7e358d1b1de9 | ishandutta2007/codeforces-s | snuke/normal/475/D.cpp | #include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<deque>
#include<vector>
#include<string>
#include<string.h>
#include<cstdlib>
#include<ctime>
#include<cmath>
#include<map>
#include<set>
#include<iostream>
#include<sstream>
#include<cctype>
#define fi first
#define se second
#define rep(i,n... | ALGO | 0.999789 | 3.610411 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6a3effa3a766... |
e4a764c9-16b6-4859-a4f6-1535a8034b01 | n-inja/kyoupro | src/agc/028/agc28a.cpp | #include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
long long gcd(long long a, long long b) {
if (a % b == 0)
return b;
return gcd(b, a % b)... | ALGO | 0.99994 | 3.301647 | {
"github_metadata": {
"branch": "master",
"commit_count": 468,
"repo_created_at": "2017-07-18T01:13: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": "5af504a4... |
83cfbe0a-a2ad-4211-8708-4a87af8f2bf1 | black-shadows/InterviewBit-Topicwise-Solutions | Trees/Sum binary tree or not.cpp | /**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
int sum(TreeNode *root)
{
if(root == NULL)
return 0;
return sum(root->left) + root->val + sum(root->right);
}
... | ALGO | 0.999954 | 5.334374 | {
"github_metadata": {
"branch": "master",
"commit_count": 141,
"repo_created_at": "2018-06-16T10:05:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 363,
"forks": 217,
"issues": 1,
"pull_requests": 2
},
"file_meta": {
"content_id": "0b47... |
979b2276-9b53-4e28-97a4-fa4b168b2069 | AdityaPatil-AP/LeetCode-Questions-TopicWise | Leet_Code_Solutions/SlidingWindow/gfg.maximum-of-all-subarrays-of-size-k.cpp | class Solution
{
public:
//Function to find maximum of each subarray of size k.
vector <int> max_of_subarrays(int *arr, int n, int k)
{
// your code here
vector<int> ans;
// This is an array question, + subarrays + window size of 3. - every subarray's maximum value
// to b... | ALGO | 0.999892 | 5.569519 | {
"github_metadata": {
"branch": "main",
"commit_count": 286,
"repo_created_at": "2022-07-24T12:59: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": "ce4ef1be24... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.