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
492838ef-0e45-4e6f-a39b-c46ce871050d
Cortesja/AL3_KamataEngine3D
DirectXGame/Matrix4x4f.cpp
#include "Matrix4x4f.h" #include "Novice.h" #include <math.h> #include <cassert> void MyNamespace::Matrix4x4f::MatrixScreenPrintf(int x, int y, const Matrix4x4& matrix, const char* str) { Novice::ScreenPrintf(x, y + kRowHeight, "%s", str); for (int row = 0; row < 4; ++row) { for (int column = 0; column < 4; ++colu...
ALGO
0.954753
4.586658
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-04-15T07:37: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": "c415ef72008e...
229e162c-77ab-471c-b7f6-eb03ab93f17b
Gavinotfound/usaco2023
8.syntax_struct/P5742【深基7.例11】评等级.cpp
#include <iostream> using namespace std; const int N = 1010; struct Stu { int num, s1, s2, s3; int total() { return s1 + s2; } } su[N]; bool isgood(Stu x) { if (x.total() > 140 && x.s3 <= 800) return true; return false; } int main() { int n; cin >> n; for (int i...
ALGO
0.997787
3.879341
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2023-12-16T07:08:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1fcaf590c...
f3492cd7-ab27-4932-9fed-5e7a6e1d2f69
husong998/algo
archieve/codeforces/edu#67/D.cpp
#include<bits/stdc++.h> using namespace std; const int maxn = 300010, INF = 0x3f3f3f3f; int t[4 * maxn], b[maxn]; deque<int> s[maxn]; void build_tree(int v, int tl, int tr) { if (tl == tr) t[v] = s[tl].empty() ? INF : s[tl][0]; else { int m = (tl + tr) / 2; build_tree(v * 2, tl, m); build_tree(v * 2...
ALGO
0.999996
3.892529
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2019-06-28T13:03: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": "ae8156ff0...
55f8b26c-2b17-4b9d-887d-c0884548bccf
Baplisca/AtCoder-Submission
atcoder.jp/arc011/arc011_2/Main.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define rep(i,n) for(int i=0;i<n;++i) #define rep1(i,n) for(int i=1;i<n;++i) #define exrep(i, a, b) for(ll i = a; i < b; i++) #define out(x) cout << x << endl #define EPS (...
ALGO
0.999864
3.585843
{ "github_metadata": { "branch": "master", "commit_count": 1610, "repo_created_at": "2020-08-25T04:37: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": "a0fd99c...
852be98e-96be-4b36-aff7-1c4b88a58685
KrauzerKrip/model-editor
lc_client/src/lc_client/eng_npc/npc_graph.cpp
#include "npc_graph.h" #include <queue> #include "lc_client/exceptions/npc_exceptions.h" NpcGraph::NpcGraph(std::vector<npc::GraphVertex> vertices, std::vector<npc::GraphNode> nodes) : m_vertices(vertices), m_nodes(nodes) { _ASSERT_EXPR(m_vertices.size() < UINT_MAX, "NpcGraph: too much vertices."); _ASSERT_EXPR(m_...
ALGO
0.998687
4.497472
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-02-24T11:00: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": "5d9b1ceda60c...
3044a474-e443-4202-8716-042a4f1d91f5
KoEonYack/LevelUp-Algorithm
InflearnLecture/89_토마토_cpp.cpp
/* 89. 토마토 Idea. BFS(pair 사용) Input. 6 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 >>8 @ 유사문제: @ Ref. @ Start day: 19. 12. 01. @ End day: 19. 12. 01. */ #include <cstdio> #include <iostream> #include <algorithm> #include <queue> #include <vector> using namespace std; int map[1000][1000]; int check[1...
ALGO
0.999934
4.088689
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2019-09-12T03:50:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f8b74eb...
a01176be-42c2-45fc-b42e-0307cbccc8ec
altanai/Android-SIP-IMS-RCS-WebRTC
android-rcs-ims-stack-read-only/codecs/video/m4v_h263/dec/src/post_filter.cpp
/* ------------------------------------------------------------------ * Copyright (C) 1998-2009 PacketVideo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
ALGO
0.990029
4.911829
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2014-01-17T15:15:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f83d29d...
bfa3ad7e-7ff7-43ea-b2e8-5f10095aa1b2
Riya2497/GFGSolutions
stacks&queues/Implement_stack_and_queue_using_deque.cpp
#include <iostream> #include <climits> using namespace std; struct Node{ struct Node* prev; int data; struct Node* next; }; class Deque{ private: Node* head; Node* tail; public: Deque(){ head = NULL; tail = NULL; } bool isEmpty(){ ...
ALGO
0.997169
3.886753
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2021-01-25T19:23: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": "804c1a4f09d...
e8b3b340-fe2f-43f1-a2ad-cedd1b8fc161
AdityaShekharTiwary/geeks_for_geeks
gfg_sum.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; long long sumBetweenTwoKth( long long a[], long long n, long long k1, long long k2); int main() { long long t; cin>>t; while(t--) { long long n, k; cin>>n; long long a[n+5]; for(int i =0;i<n;i++) ...
ALGO
0.999856
6.019032
{ "github_metadata": { "branch": "master", "commit_count": 393, "repo_created_at": "2020-09-07T15:34:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9cb16a9...
ff1487f9-5841-4c43-a3d1-56ae877077c7
little-pumper/four-in-a-row-game
main.cpp
#include <iostream> #include <fstream> #include <ctime> #include <stack> #include "Strategy.h" #include "function.h" #include "Judge.h" using namespace std; int main(){ cout << "欢迎游玩重力四子棋!\n"; srand((unsigned)time(nullptr)); int M = 0, N = 0, current_player = 0, think_time = 3; int not_to_start; do...
ALGO
0.995545
3.741729
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-11-11T13:40: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": "1246d3ce54...
f854193e-d8c6-47a7-8ab4-59aa5e5dd46a
HypertextAssassin0273/Data_Structures_in_Cpp
DS_Course_Spring_21_&_Fall_22/LAB/Sir Ali Shah Fatimi (Improvement)/LAB#10/L10#3,4.cpp
#include <iostream> using std::cout; //comparators: bool greater(int a, int b){ return a>b; } bool lesser(int a, int b){ return a<b; } void heapify(int *arr, int size, int Data, bool (*comparator)(int, int)){ int key=Data, left=2*Data+1, right=2*Data+2; if(left<size&&comparator(arr[left], arr[key])) key=lef...
ALGO
0.997102
4.220855
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2021-04-19T09:56:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 110, "forks": 13, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a0c1c8d...
cfb8c4ed-408f-475c-9a47-949fb30d342a
sandhu28/APNA-COLLEGE-DSA-SHEET-QUES
contests/Uber round1.cpp/bowling pins.cpp
#include<iostream> #include<bits/stdc++.h> #define pii pair<int,int> #define lli long long int #define li long int #define vi vector<int> #define vd vector<double> #define vvd vector<vector<double>> #define vvi vector<vector<int>> #define vpii vector<pair<int,int>> #define vlli vector<lli> #define vli vector<li> #defin...
ALGO
0.999981
3.647737
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2022-05-26T17:13: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": "e02671916...
693ee82f-f01c-451c-96ae-c3d0c9ccb9e2
vNaonLu/leetcode-daily
src/q_3251_3300/q3254.cc
// Copyright 2024 <NAME> // // This file describes the solution of // Find the Power of K-Size Subarrays I // // https://leetcode.com/problems/find-the-power-of-k-size-subarrays-i/ // // Question ID: 3254 // Difficult : Medium // Solve Date : 2024/11/16 12:32 #include <iosfwd> #include <vector> // -- This header mus...
ALGO
0.999886
6.693767
{ "github_metadata": { "branch": "main", "commit_count": 2477, "repo_created_at": "2021-09-06T15:30:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2af7cd8d9...
5b4208d5-6908-44a2-a493-389f6c7d5391
cogotti-giulia/algorithms-and-data-structures
data_structures/arrays/random_exercises/06-trova_minimo/main.cpp
/** * @file main.cpp * @author cogotti-giulia (<EMAIL>) * @brief test trova minimo su array (approccio divide et impera) * @version 1.0 * @date 2023-12-09 */ #include <cmath> #include <cstdlib> #include <fstream> #include <iostream> #include <sstream> #include <string> #include <vector> int minimum(const std::v...
ALGO
0.998917
5.388226
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2023-11-06T19:18: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": "7fa9fcaf12...
4fb3040e-ac67-4d7e-a886-07f7041d761e
ArcRaizen/Glade-Engine
GladeEngine/Contacts/ContactResolver.cpp
#include "ContactResolver.h" #include "../Utils/Trace.h" using namespace Glade; ContactResolver::ContactResolver(unsigned int iter, gFloat impEp, gFloat penEp) : impulseIterations(iter), penetrationIterations(iter), impulseEpsilon(impEp), penetrationEpsilon(penEp) { } ContactResolver::ContactResolver(unsigned int iIte...
ALGO
0.99925
3.923776
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-10-24T04:55: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": "9f029e1557...
0e4dfd01-d649-49d0-b789-089ec2cf0db2
Racon23/leetcode2
solution/1002.查找常用字符.cpp
// @before-stub-for-debug-begin #include <vector> #include <string> #include <unordered_map> #include <algorithm> #include "commoncppproblem1002.h" using namespace std; // @before-stub-for-debug-end /* * @lc app=leetcode.cn id=1002 lang=cpp * * [1002] 查找常用字符 * * https://leetcode-cn.com/problems/find-common-chara...
ALGO
0.999898
6.352718
{ "github_metadata": { "branch": "master", "commit_count": 312, "repo_created_at": "2020-09-29T09:55: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": "091b2443...
3feb4083-057b-45e5-ad5b-6feaaafd9c88
its-yogesh-v/DSALeetCode
0018-4sum/0018-4sum.cpp
class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { vector<vector<int>> fourSumResult; int n = nums.size(); if (n < 4) { return fourSumResult; } sort(nums.begin(), nums.end()); for (int a = 0; a < n - 3; a++) { ...
ALGO
0.999935
6.184426
{ "github_metadata": { "branch": "main", "commit_count": 1319, "repo_created_at": "2022-05-20T03:24: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": "d2499d377...
ab2b0429-7e8e-48ee-a529-3c6e073946ab
av-maramzin/icsa-dswp
test/even-fibonacci.cpp
/* * Project Euler Problem 2: * * Each new term in the Fibonacci sequence is generated by adding the previous * two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, * 8, 13, 21, 34, 55, 89, ... * * By considering the terms in the Fibonacci sequence whose values do not exceed * four milli...
ALGO
0.999939
5.880466
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2018-02-06T11:53:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8581e9710...
2d2ae72f-7522-4476-9919-fb1a821aba9e
yasshi-no/pendulum_simulation
include/pendulum.hpp
#pragma once #include <cmath> #include <vector> using namespace std; /* 振り子を表すクラス. 振り子の座標は, 左の方向にx軸, 下の方向にy軸が伸びている. 振り子の角度は, x軸の正の向きとの成す角. */ class Pendulum { private: int pendulum_num; // 振り子の数 double time; // 時間 vector<double> string_lengths; // 振り子の糸の長さ vector<doubl...
ALGO
0.989489
5.276247
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2022-06-10T09:29:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04f4b87840f...
79cd4feb-1d5a-4b04-b9b5-dc0d15ced927
Priyasha-Yadav/Cpp
Q33.cpp
// 32.Write a program that categorizes a person’s age group based on the given age: #include <iostream> using namespace std; void categorizeAgeGroup(int age) { if (age < 13) { cout << "Child" << endl; } else if (age >= 13 && age <= 19) { cout << "Teenager" << endl; } else if (age ...
TOOL
0.980399
4.544534
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-12-18T15:32: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": "f6113bee141...
c17fb0bd-f61a-484c-bc8b-82177f977290
taekwan-yoon/kattis
c++/solved/speed_limit.cpp
/* ------------------------------------------------------- Problem: Speed Limit ------------------------------------------------------- Description Bill and Ted are taking a road trip. But the odometer in their car is broken, so they don’t know how many miles they have driven. Fortunately, Bill has a working stopwatch,...
ALGO
0.999076
4.666624
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2023-03-11T22:33: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": "d4e4f99ca15...
3bbc4f42-039d-420d-b5e0-1984908d84d1
titsuki/AOJ
Volume_05/0502_Dice.cpp
#define _USE_MATH_DEFINES #define INF 10000000 #include <iostream> #include <sstream> #include <cmath> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> #include <bitset> #include <list> using namespace std; ty...
ALGO
0.999841
3.893516
{ "github_metadata": { "branch": "master", "commit_count": 1653, "repo_created_at": "2014-12-21T06:24:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f7b568...
aecca2da-272e-40cf-a88c-9cc689324e3a
zerujio/procedural-placement-lib
example/example-common.cpp
#include "glutils/vertex_array.hpp" #include "glutils/buffer.hpp" #include "simple-renderer/glsl_definitions.hpp" #include "simple-renderer/renderer.hpp" #include "placement/placement.hpp" #include "placement/density_map.hpp" #include "example-common.hpp" #include "stb_image.h" #include "imgui.h" #include "glm/ve...
TOOL
0.953132
6.832775
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2022-08-30T20:52:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba26d65359...
784e0c0c-687e-4880-a758-ad7179015092
prady91/CPP-Practice
BitWise/singlenum3repeat.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; //All the numbers are reapated 3 times except for 1 number which is unique, find it int singleNumber(vector<int>& nums) { int sum,i,l; l = nums.size(); int ones=0,twos=0,common=0; //ones keep track of the num...
ALGO
0.999754
4.416309
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-09-16T02:13: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": "1864c79366...
2b881ca5-4390-4110-a276-efedff2f9e61
ballballu/ThreadSimulation
threadSimulation/threadSimulation.cpp
// threadSimulation.cpp : 定义 DLL 应用程序的导出函数。 #include "stdafx.h" #include "threadSimulation.h" const double inter = 1; const int number_node = 150; const double radius = 0.5; vector<threeVector> rope; void initSimulation(float input[150][3]) { //输入150个点的xyz坐标 rope.clear(); for (int i = 0; i < number_node; i++) {...
ALGO
0.999167
3.832998
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-11-24T16:45: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": "1970f42bdb...
fc1215b9-436e-4b44-9e49-373425ff935a
1250855168/Cpp11
list_.cc
#include <algorithm> #include <iostream> #include <list> #include <vector> int main() { std::list<int> l{1, 2, 3}; std::for_each(l.begin(), l.end(), [](int a) { std::cout << a << " "; }); std::cout << std::endl; std::list<int> l1(2, 3); std::for_each(l1.begin(), l1.end(), [](int a) { std::cout << a << " ...
TOOL
0.992221
4.368917
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-08-01T01:08:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1fe9ba796ed...
bc7bb17c-464b-4ce8-8982-b494c965274e
arihantag06/Leetcode
632-smallest-range-covering-elements-from-k-lists/smallest-range-covering-elements-from-k-lists.cpp
class Solution { public: vector<int> smallestRange(vector<vector<int>>& nums) { int maxi = INT_MIN, k = nums.size(); priority_queue<pair<int,pair<int,int>>, vector<pair<int,pair<int,int>>>, greater<pair<int,pair<int,int>>>> pq; ...
ALGO
0.999994
6.374729
{ "github_metadata": { "branch": "main", "commit_count": 477, "repo_created_at": "2024-08-29T10:51: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": "e6efa03529...
7baa8077-dc2d-49aa-b6fd-d3786ce83e23
AlohaHenrySCD/General-Program
竞赛/contest1888/B.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <queue> #include <cmath> #include <string> #define _for(i,a,b) for(int i=(a);i<(b);i++) #define _rep(i,a,b) for(int i=(a);i<=(b);i++) #define ll long long #define pii pair<int, int> using namespace std; int t, n, m,...
ALGO
0.999619
3.380903
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-07T02:21: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": "491221aa0479...
3ba7aa5e-1588-4ea3-9394-7a125b86cd4d
gourav2121raghuwanshi/leetcode-codes
3797-design-spreadsheet/3797-design-spreadsheet.cpp
class Spreadsheet { public: int r; vector<vector<int>> v; Spreadsheet(int rows) { r = rows; v.resize(rows, vector<int>(26, 0)); } void setCell(string cell, int value) { int col = cell[0] - 'A'; int row = stoi(cell.substr(1)) - 1; v[row][col] = value; } ...
ALGO
0.997254
5.839145
{ "github_metadata": { "branch": "main", "commit_count": 2807, "repo_created_at": "2024-07-28T05:57: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": "1cc67f273...
62558e9c-6439-4348-900f-ff8cd8032760
AdrianFRadulescu/viagogo_coding_challenge
event_plane.h
// // Created by <NAME> on 22/11/2017. // #ifndef VIAGOGO_CODING_CHALLENGE_EVENT_GRID_H #define VIAGOGO_CODING_CHALLENGE_EVENT_GRID_H #include "event.h" #include <queue> #include <functional> #include <random> #include <chrono> #include <iostream> /** * Represents a general point(may or may not contain an event) in...
ALGO
0.992619
4.951104
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-11-21T18:38: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": "9a0ba1f1f...
29e0f66c-39cf-4557-81ce-c91f5a641871
parb220/dsmh_npsol_package
src/time_series/test_tvsbvar_optimization.cpp
#include <cstdlib> #include <iomanip> #include <getopt.h> #include <fstream> #include <ctime> #include <mpi.h> #include "dw_rand.h" #include "dw_ascii.h" #include "dw_dense_matrix.hpp" #include "dw_data.hpp" #include "dw_ascii.hpp" #include "regime_processes.hpp" #include "tvsbvar.hpp" #include "CEESParameter.hpp" #inc...
ALGO
0.998315
3.670581
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-04-11T18:45:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0be17ddf1...
a473e398-3f36-4fa7-afdf-19fd8f5d869a
GuessEver/ACMICPCSolutions
CodeForces/551/C/C.cpp
#include <cstdio> const int N = 100000 + 10; int n, m, a[N], c[N]; bool check(long long res) { for(int j = 1; j <= m; j++) c[j] = a[j]; int p = 1; long long t = 0; for(int j = m; j >= 1; j--) if(c[j]) { if(p > n) return 0; if(j > res) return 0; if(t == 0) t += j; if(t + c[j] <= res) { t += c[j]; ...
ALGO
0.999964
3.360182
{ "github_metadata": { "branch": "master", "commit_count": 186, "repo_created_at": "2015-01-23T06:34:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59f2c5db...
02f0f642-c4c8-42ec-a4f8-dd64d781ce29
Luvkush8941/Cplusplus-codes
STL for Competitive Coding/Part_7a_Nesting_in_STL_Maps_and_sets.cpp
#include<bits/stdc++.h> using namespace std; int main(){ /* // Pair as a key and keys in maps are stored in the sorted // manner. In case of unordered map we cannot take complex container for keys. map< pair< string, string>,vector<int> > m; // Taking vector for the marks of the students int ...
ALGO
0.999284
4.276899
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-07-15T17:14:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2112a2aa25b...
121a0678-a303-46a3-b4e9-8eeacd875546
kskisb/atcoder_submissions
abc/176/wizard_in_maze.cpp
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <cmath> #include <limits.h> #include <map> #include <set> #include <queue> using namespace std; using ll = long long; const vector<int> dx = {1, 0, -1, 0}; const vector<int> dy = {0, 1, 0, -1}; // 01-bfs int main() { int H, W, sx...
ALGO
0.999948
4.128449
{ "github_metadata": { "branch": "main", "commit_count": 195, "repo_created_at": "2024-03-25T11:44: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": "a80c0735f0...
4308bffe-a4ce-403a-a2b8-a3ddbb7c30fe
Xcrater/PIC-Projects
lfr_pid_3.cp
#line 1 "E:/pic_codes/lfr_pid_3.c" unsigned int s1,s2,s3,s4,s5,s6,s7,s8; unsigned short int basespeed = 60, Kp = 80, Ki = 50,Kd = 60,dt=10; float rightpulse=0,leftpulse=0,perror=0,error=0,PROPORTIONAL=0,INTEGRAL=0,DERIVATIVE=0,correction=0; char lastreading; void initport() { ADCON1 =0x06; PORTA = 0; PORTE = 0; TRI...
ALGO
0.998086
4.584335
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-11-05T09:36:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2f34e4887...
ae52007c-40b7-4c25-bc8f-a5b8ddde4594
Andrewnetwork/Distributed-Control-Of-Robots-Via-REST
CommandCentre/NSS_arithmetic_functions.cpp
/** NSS_arithmetic_functions.cpp * <NAME> * November 24, 2009 **/ #include "NSS.h" #include "constants.h" #include <map> #include <string> #include <vector> #include <iostream> using namespace std; namespace comandrewribeiroremoterobot { //**************** START FUNCTION PROTOTYPES ************* bool containsCh...
TOOL
0.948074
3.422696
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-03-22T04:58: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": "6a25a574c8...
a1ea543e-dd1b-4714-a563-e5410c1c8cc9
TopHK/fightcode
array/FindMin_153.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; int x=[](){ std::ios::sync_with_stdio(false); cin.tie(NULL); return 0; }(); class Solution { public: int findMin(vector<int>& nums) { int size = nums.size(); int start = 0, end = size-1; while(star...
ALGO
0.999983
5.436441
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2018-04-03T11:49: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": "f8322a856...
4925d69a-2d07-4918-a6ce-d42a1711abb1
leeuihyun/Baekjoon-study-with
KWON/20220110/1_1003.cpp
#include <iostream> #include <stdlib.h> #include <vector> #include <string.h> #include <string> #include <queue> #include <algorithm> using namespace std; int T, N; size_t cnt_zero, cnt_one; pair<size_t, size_t> memoization[41] = { {0,0}, }; pair<size_t, size_t> fibonacci(int n) { if (n == 0) { return memoization[...
ALGO
0.999939
3.927187
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2021-12-27T05:19:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "561b0e4eed...
4ca01a73-01d5-4183-ae6d-cd0b71bd1e48
ishandutta2007/codeforces-h
hydrogen_zyx/normal/1553/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 10; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int t; cin >> t; while (t--) { string s; cin >> s; int ans1 = 10, ans2 = 10; int now = 0; ...
ALGO
0.999939
4.531989
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "6093b7a9ff0a...
c0d76f2d-5b24-4763-9b7c-6075e228894c
townboy/acm-algorithm
HDOJcode/1524 2013-07-19 11 33 41.cpp
****************************** Author : townboy Submit time : 2013-07-19 11:33:41 Judge Status : Accepted HDOJ Runid : 8637944 Problem id : 1524 Exe.time : 15MS Exe.memory : 440K https://github.com/townboy ****************************** #include<stdio.h> #include<iostream> #include<vec...
ALGO
0.999878
3.474676
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2014-03-23T03:30: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": "d52aa27fa...
a7b0ea47-8562-4c1f-90b6-92bc33844b5e
ChanhuiSeok/CodingTestBooks_sourcecode
CH11~/CH13_괄호변환.cpp
#include <iostream> #include <algorithm> #include <string> #include <stack> using namespace std; // 항상 들어오는 문자는 균형잡힌 괄호 문자열이므로, // 올바른 괄호 문자열인지 판단하는 함수가 필요함 bool isCorrect(string s) { stack<char> st; for (int i = 0; i < s.size(); i++) { if (s[i] == '(') st.push(s[i]); else if (!st.empty() && st.top() == '(' &&...
ALGO
0.999896
4.90892
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2020-08-07T09:42: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": "0bd94cd79...
6680641b-8869-4817-a167-6e0832320c88
monta0315/atcoder_begin
past/hachi.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define all(v) sort(v.begin(), v.end()) #define rev(v) reverse(v.begin(),v.end()) #define out(s) cout << s << endl typedef long long ll; using Graph = vector<vector<int>>; int main(){ string s; cin>>s; vector<int> cnt(10...
ALGO
0.999577
3.761381
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2020-04-10T14:44: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": "4c9211abe...
b5e80709-f10d-4217-9212-f01c4d7f89bf
pokorska/mgr
2stackPDA_parser/translation.h
#ifndef TRANSLATION_H_ #define TRANSLATION_H_ #include <string> #include <vector> #include "ast.h" #include "../shared_files/constants.h" #include "names_manip.h" // Creates transitions corresponding to pushing the given symbol to the top of the given stack. void build_pushing_symbol(const std::string& base, int sym...
ALGO
0.98399
6.114372
{ "github_metadata": { "branch": "master", "commit_count": 120, "repo_created_at": "2017-12-18T21:56:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e3b12fbc...
36ba539f-c895-49f9-802a-df8f5ba0b829
PavanYalavarthi/CSES-Problem-Set
C++/Introductory Problems/Weird Algorithm.cpp
/* Problem Statement: Consider an algorithm that takes as input a positive integer n. If n is even, the algorithm divides it by two, and if n is odd, the algorithm multiplies it by three and adds one. The algorithm repeats this, until n is one. For example, the sequence for n=3 is as follows: 3 → 10...
ALGO
0.999982
5.071129
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-01-26T14:08: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": "7138d0eeb26b...
9696f429-130f-4d85-bb25-fd1a66c9c4df
joohongpark/algorithm_study
DynamicProgramming/LeetCode_DP_221.cpp
class Solution { public: int maximalSquare(vector<vector<char>>& matrix) { int memoization[300][300]; int rtn = 0; for (int y = 0; y < matrix.size(); y++) { for (int x = 0; x < matrix[0].size(); x++) { if (x == 0 || y == 0) { memoization[y][x] ...
ALGO
0.999931
6.047212
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2021-11-23T09:14: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": "9c9bc924f...
df395221-7394-49fc-bb99-ae47971c9194
maskmind/OpenCV-Learning-Scripts
chapter08se/chapter08se/useRectAndCircle8_3.cpp
////#include<opencv2/opencv.hpp> ////#include<iostream> ////using namespace std; ////using namespace cv; //// ////void useRecToShow() { //// Mat image(600, 600, CV_8UC3); //// RNG& rng = theRNG(); //// while (true) //// { //// int count = rng.uniform(3, 103); //// vector<Point> points; //// //// for (int i = 0; i < ...
ALGO
0.965459
4.686575
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-07-16T09:12:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46cf5c64c9...
22fc8224-6b92-4d92-817b-eca4fededb48
Flowx08/GravitySimulator
src/simulator_barneshut.cpp
#include "simulator_barneshut.hpp" #include "SDL2/SDL_keycode.h" #include "SDL2/SDL_stdinc.h" #include "bhquadtree.hpp" #include "config.hpp" #include "particle.hpp" #include "util.hpp" #include <algorithm> #include <omp.h> void SimulatorBarnesHut::initializeParticles(Renderer& r, unsigned int count) { printf("Simula...
ALGO
0.998083
4.136991
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-12-13T13:59:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c29d757ba4...
793ca7b1-6eef-43e2-9b6d-18cd0bf73fc0
yashparmar15/Cpp-Codes
Partition_Array_for_Maximum_Sum.cpp
/*Given an integer array arr, you should partition the array into (contiguous) subarrays of length at most k. After partitioning, each subarray has their values changed to become the maximum value of that subarray. Return the largest sum of the given array after partitioning. Example 1: Input: arr = [1,15,7,9,2,5...
ALGO
0.999819
5.356536
{ "github_metadata": { "branch": "master", "commit_count": 831, "repo_created_at": "2020-06-30T16:20:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa2bb44d...
c7527412-28ca-42ee-af5b-5a1b58405d8f
NewBirdlily/leetcode
C++/mergeTrees.cpp
#include<iostream> struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; class Solution { public: TreeNode* mergeTrees(TreeNode* t1, TreeNode* t2) { if (!t1 && !t2) { return nullptr; } ...
ALGO
0.999992
5.65821
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-05-12T17:55: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": "8273e6370e...
0a434eac-b9a4-40da-9362-da11789daf96
citrus610/lemon-tea-2
bot/plan.cpp
#include "plan.h" namespace LemonTea { PathfinderNode::PathfinderNode() { this->placement = Piece(); this->move.reserve(32); this->move.clear(); this->time = 0; }; bool PathfinderNode::attempt(Board& board, MoveType move) { bool success = false; Piece previous = this->placement; switch (...
ALGO
0.997737
4.612509
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-03-18T15:55:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc0308ca99e...
9f1b3c54-7f44-4188-9d42-e6c615522ded
bbhitec/leetcode_doodles
done/938_range_sum_bst.cpp
/* [mst] 938_range_sum_bst.cpp Given the root node of a binary search tree and two integers low and high, return the sum of values of all nodes with a value in the inclusive range [low, high]. Gains: -Binary trees behaviour -Recursive aproach cpp features, changelog: -2022.12: -initial draft -recursive solution s...
ALGO
0.999996
6.642777
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2022-01-27T12:55:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8eb33e22b8...
776a01a5-fd3d-4db7-9b88-69534782c8e1
Mike-Ibrahim1/Winter_CIS_5_2022
Homework/CodeE Assignment_2/Gaddis_9thEd_Chap3_Prob8_Insurance/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on January 19, 2022, 9:50 PM * Purpose: How much insurance is needed */ //System Libraries #include <iostream> //Input/Output Library using namespace std; //User Libraries //Global Constants, no Global Variables are allowed //Math/Physics/Conversions/Higher Di...
TOOL
0.928427
3.89334
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-02-08T07:15: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": "f7d3374ca97a...
ab47ba6d-0edd-4650-bab9-3416868cf11c
cDavidV10/progra1-UES-2024
Guia3/ejercicio1.cpp
// <NAME> VR24001 #include <iostream> #include <limits> using std::cin; using std::cout; using std::endl; using std::numeric_limits; using std::streamsize; #define size 5 void guardar(int[]); int menu(); int leer(); int sumaElementos(int[]); void minMax(int[], int &, int &); void productoEscalar(int[], int[]); i...
ALGO
0.982984
3.950603
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2024-09-02T02:32:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff83c6b3a...
f0907ce5-dc0d-4618-91d1-15c522eba436
naimurhasan/dsa-journey
src/025_uva_jolly_jump_unsolved.cpp
// Author: <NAME> // Date: 17-12-22 // unsolved #include<bits/stdc++.h> using namespace std; void LOG() {} template<typename Head, typename... Args> void LOG(const Head& head, const Args&... args ) { std::cout << head << " "; LOG(args...); } int main(){ int N; while(cin >> N){ int lastDigi...
ALGO
0.999558
3.48214
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-11-08T05:31: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": "41d2fa47ed2...
190acdab-4196-4877-a935-ce6549ee5c13
nqdat2002/My-Source
Testcase/Bai25/bai25.cpp
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr), cout.tie(nullptr)->ios::sync_with_stdio(false); freopen("4.inp", "r", stdin); freopen("4.out", "w", stdout); // int m, n; // cin >> m >> n; // vector<int> a(m), b(n); // for (int i = 0; i < m; i++) { // cin >> a[i]; // } // for(int...
ALGO
0.999989
3.715066
{ "github_metadata": { "branch": "main", "commit_count": 218, "repo_created_at": "2022-02-20T12:14:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e05bb32c3...
9d5476b7-c5dc-4d5b-ba59-27bf0cd4bc33
TomArrow/pano2cube
pano2cube/conversionCode.cpp
#define _USE_MATH_DEFINES #include <math.h> #include <opencv2/imgproc/imgproc.hpp> using namespace cv; // All or most of the below is lifted from https://stackoverflow.com/a/34720686 // Changes by me: The function definition was changed a bit from inline and put into a header file // Original code written by Emiswelt...
ALGO
0.996259
6.535384
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2022-02-23T17:56:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ea991e386...
79f735d3-a550-4fad-8240-4c59b0c5d3ad
tangziyi001/competitive-programming
Geometry/GleamingTheCubes.cpp
/* * UVA 737 * Created by <NAME> * */ //#include <bits/stdc++.h> #include <iostream> #include <cstdio> #include <string> #include <cstring> #include <cstdlib> #include <sstream> #include <cmath> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #...
ALGO
0.997409
3.338632
{ "github_metadata": { "branch": "master", "commit_count": 220, "repo_created_at": "2015-09-15T13:45: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": "24451677...
e4254eda-39eb-4460-9128-f25d4f01e794
CosmicVeil/Codeforces
Mathematical Problem/Mathematical Problem/main.cpp
// // main.cpp // Mathematical Problem // // Created by <NAME> on 2024-07-22. // #include <bits/stdc++.h> using namespace std; int main(int argc, const char * argv[]) { // insert code here... int N; cin >> N; while(N--){ int a; cin >> a; string s; ...
ALGO
0.999877
4.584949
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-10-08T23:13:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "048daa72617...
d6e22f14-4c12-41a2-82ba-2a949e80c5df
EssaHusary/interactive-dictionary-cpp
EssaHusary_CSC340_Assignment3_PartC/EssaHusary_CSC340_Assignment3_PartC/PuttingEverythingTogether.cpp
#include <iostream> #include <string> #include <map> #include <vector> #include <cstring> #include <algorithm> #include "PuttingEverythingTogether.h" #include "DataOperations.h" #include "DataSource.h" using namespace Together; using namespace Operations; using namespace Source; using namespace std; vector<string...
TOOL
0.967983
3.0939
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-08-13T06:18: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": "cf0913c118a...
971000c8-2132-435d-87b4-db34345c4bae
nkersting/Code
knapsack.cpp
// 0-1 Knapsack problem #include <iostream> #include <cmath> using namespace std; // given total Weight W allowed, number of items N and their weights and values, // maximize value int Knap(int wt[], int val[], int N, int W) { int K[N+1][W+1]; // solution table for (int i = 0; i <= N; ++i) // number of item...
ALGO
0.999994
4.563842
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2013-12-31T19:50:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "e6e74d591...
1dd8dcb5-534f-4cea-ae8a-a22cb9ef1296
odol0503/InterviewBit
ib/level7/DynamicProgramming/NDigitNumWithSumS.cpp
/************************************************************************************************* N digit numbers with digit sum S Find out the number of N digit numbers, whose digits on being added equals to a given number S. Note that a valid number starts from digits 1-9 except the number 0 itself. i.e. leading z...
ALGO
0.999965
4.72736
{ "github_metadata": { "branch": "master", "commit_count": 278, "repo_created_at": "2018-01-03T01:15:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5673a917...
667a070c-fe58-4952-bbb2-f600b208e995
HandMi/coding-problems
Codeforces/CF1257E/src/main.cpp
#include <algorithm> #include <iostream> #include <set> #include <vector> std::uint32_t LongestIncreasingSubsequence(const std::vector<std::uint32_t> &sequence) { std::set<std::uint32_t> lis; for (auto &number : sequence) { auto it_low = lis.lower_bound(number); if (it_low != lis.end()) ...
ALGO
0.999886
4.452456
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2019-11-12T16:10:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b2f3591...
88eb4067-adb6-48ea-b655-b632a0920184
SWG-Source/client-tools
src/external/3rd/library/videocapture/SoeUtil/StringUtil.h
// Copyright 2007 Sony Online Entertainment, all rights reserved. // Author: <NAME> #ifndef SOEUTIL_STRINGUTIL_H #define SOEUTIL_STRINGUTIL_H #include <stdio.h> #include <stdarg.h> #include <stdlib.h> #include <wchar.h> #include <limits> #include "Types.h" #include "StringLocale.h" #include "SystemInternal.h" /////...
TOOL
0.961068
6.664092
{ "github_metadata": { "branch": "master", "commit_count": 111, "repo_created_at": "2018-11-25T23:57:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 39, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "cf8216a...
438e8cf6-b653-4da9-8fcc-a453e9ae85c1
gyeolse/algorithm_study
~2022/Shortest Path/1504.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 1000 #define INF 987654321 int n, e; int v1, v2; int oneToV1, oneToV2, v1ToV2, v2ToN, v1ToN; vector<pair<int, int>> graph[MAX]; int dist[MAX]; int dijkstra(int start, int end) { int res=0; //1. INF 초기화 fill_n(dist, MAX, INF); //1. 시작점 초기...
ALGO
0.99998
4.28729
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2020-03-09T10: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": "09d03878...
55deaee4-a2d8-4bc2-af6c-90de221136f2
JonPatrick99/Lab3
Lab3.cpp
// <NAME> // Lab 3 // COSC 2030 // Oct 1, 2018 #include<iostream> using std::cin; using std::cout; using std::endl; short shortSum(short val); long longSum(long val); float floatFact(float val); double doubleFact(double val); float floatRecip(float val); int main() { short n = 0; cout << "Enter a number that will...
ALGO
0.953575
3.063516
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-10-01T03:41: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": "38ed5eacd...
7b1acd90-2315-4c6c-89a7-2e332581dd6e
Tahsin005/Problem-Solving
Binary Search/order_not_known_search.cpp
#include<bits/stdc++.h> #define ll long long #define yes cout<<"YES"<<endl; #define no cout<<"NO"<<endl; #define nl cout<<endl; #define endl '\n' #define Tahsin ios_base::sync_with_stdio(false), cin.tie(0),cout.tie(0); using namespace std; int main(){ // int a[] = {1,2,3,4,5,6,7,8,9}; int a[] = {9,8,7,6,5,4,3,2...
ALGO
0.999994
3.838304
{ "github_metadata": { "branch": "main", "commit_count": 812, "repo_created_at": "2023-09-26T16:48:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c93ee1e92b...
f7454906-a387-4a9e-b51f-00be9cae73eb
santosh-sambhavani/DSA
linked-list/DLL-reverse-in-k-groups.cpp
// C++ implementation to reverse a doubly linked list // in groups of given size #include <bits/stdc++.h> using namespace std; // a node of the doubly linked list struct Node { int data; Node *next, *prev; }; // function to get a new node Node* getNode(int data) { // allocate space Node* new_node = (Node*)malloc...
ALGO
0.999938
5.779421
{ "github_metadata": { "branch": "main", "commit_count": 270, "repo_created_at": "2021-08-06T06:32:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6aae554a9e...
3a93fdaa-e64a-4fe8-bbe0-9ac4015fdcf4
vxl/vxl
contrib/mul/pdf1d/tools/plot_pdf_estimate.cxx
// This is mul/pdf1d/tools/plot_pdf_estimate.cxx //: // \file // \brief Plot kernel estimate to sampled data // Sample from one distribution, generate kernel estimate, generate text file for plotting. // \author <NAME> #include <iostream> #ifdef _MSC_VER # include "vcl_msvc_warnings.h" #endif #include "vnl/vnl_vecto...
ALGO
0.935031
5.4382
{ "github_metadata": { "branch": "master", "commit_count": 42154, "repo_created_at": "2013-05-02T18:32:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 250, "forks": 157, "issues": 49, "pull_requests": 0 }, "file_meta": { "content_id": "1f...
493fac92-4eba-4f34-8a5a-e694852423b5
vildenH/algorithm
022-ispoporder/ispoporder1.cpp
#include <iostream> #include <stack> #include <vector> using namespace std; // 调试开关 #define __tmain main #ifdef __tmain #define debug cout #else #define debug 0 && cout #endif // __tmain class Solution { public: bool IsPopOrder(vector<int> pushV,vector<int> popV) { if(pushV.size( ) == 0 || po...
ALGO
0.999709
5.766744
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2017-05-30T03:43: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": "db1e9b084...
b8c8eea0-3100-4e79-aeaa-cb013ce9081c
generalized-intelligence/GAAS
algorithms/src/LocalizationAndMapping/icp_lidar_localization/fast_gicp/thirdparty/nvbio/nvbio/basic/cuda/atomics.h
/* * nvbio * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice,...
ALGO
0.980206
6.113539
{ "github_metadata": { "branch": "main", "commit_count": 765, "repo_created_at": "2019-01-29T06:14:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1991, "forks": 453, "issues": 7, "pull_requests": 3 }, "file_meta": { "content_id": "7e7f3b...
3681b12c-baeb-4136-8395-b197c7c508bc
SujayVivek/CDC_Finale
Done/E_Unpleasant_Strings.cpp
#include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define ff first #define ss second typedef vector<vector<long long>> vvi; typedef vector<long long> vi; #define int long long #define endl "\n" void Solve() { int n, k; cin>>n>>k; string s; cin>>s; vvi nxt(k, vi(n+2, n+1)); for(int x ...
ALGO
0.999912
4.531025
{ "github_metadata": { "branch": "master", "commit_count": 362, "repo_created_at": "2025-05-20T06:18: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": "17aea8f5...
a30408de-5011-472f-8a16-3152f18b3621
Jojodicus/aoc24
day08/day08.cpp
#include <fstream> #include <iostream> #include <map> #include <set> #include <sstream> #include <vector> using position = std::pair<int, int>; bool isInBounds(position pos, int rows, int cols) { if (pos.first < 0 || pos.second < 0) { return false; } if (pos.first >= rows || pos.second >= cols) { ...
ALGO
0.997957
5.509424
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-12-01T15:10: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": "88ef7e62151...
98912983-7531-49be-bb67-210b0a7346e9
FarihaAktar/C-problem-solving
practice and learning/Infix postfix related problem.cpp
#include<bits/stdc++.h> using namespace std; /* Write a program to convert an infix expression to a postfix expression. The expression will contain the following characters [ a-z , + , - , * , / , ( , ) ]. */ // //int prec(char s) //{ // if(s == '+' || s == '-') // { // return 1; // } // else...
ALGO
0.999964
4.026646
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-12-28T10:15: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": "da2c2103504...
fdc8bf1f-ac19-4cf3-bb22-b3ff820fcc54
krish-shahh/EC327
Exam1Prac/gamma.cpp
#include <cmath> #include <iostream> using namespace std; float gammaFunc(float z) { float result = 1.0; for (int n = 1; n <= 1000000; n++) { result *= pow((1.0 + 1.0 / n), z) / (1.0 + z / n); } result *= 1.0 / z; return result; } float equals(float id) { float left = 0.1; float ...
ALGO
0.996192
3.421748
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2023-01-13T02:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b69d969485b...
19d13ad6-6374-43e2-86ff-17a6ec10dd8c
Ouyancheng/CPPWORKSPACE
SingleFiles/IsValidIP.cpp
#include <string> #include <iostream> #include <sstream> #include <cctype> using namespace std; int strToInt(string &str) { static stringstream ss; ss << str; int result; ss >> result; ss.clear(); str.clear(); return result; } bool isVaildIP(string str) { enum {read1, read2, read3, read4, done, error} state = r...
ALGO
0.998134
4.313786
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-05-18T11:17:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e8ff21f02...
890da418-172c-479b-a2a7-bcbad04c0339
iQliPsE-22/MyLeetCode
Practise/FullPyramid.cpp
#include <iostream> using namespace std; void full_pyramid(int rows) { for (int i = 0; i < rows; i++) { for (int k = 0; k < rows - i - 1; k++) cout << " "; for (int j = 0; j < 2 * i + 1; j++) cout << "*"; cout << endl; } } void inverted_full_pyramid(int rows...
ALGO
0.981182
4.938115
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2024-01-26T12:07:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3bd9e16a8...
fb53218d-1bc9-4013-811e-f8c071cce869
inletsun1/Project-Euler
11-20/prob16.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; const ll N = 1000; ll memo[N+1][N+1]; ll f(ll n, ll i){ if(n == 0 && i == 1) return memo[n][i] = 1; if(n == 0 || i == 0) return memo[n][i] = 0; if(memo[n][i] > -1) return memo[n][i]; return memo[n][i] = 2 * f(n-1, i) % 10 + 2 * f(n...
ALGO
0.999464
3.383263
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-01-30T20:08: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": "487dec0caf...
d052fa14-200c-4227-931f-0a52971f0366
ishandutta2007/codeforces-k
kostroma/normal/118/B.cpp
#define CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <iostream> #include <set> #include <map> #include <queue> #include <stdlib.h> #include <string> #include <string.h> #include <memory.h> #include <algorithm> #include <math.h> using namespace std; typedef long long li; typedef long double ld; typedef pair <int,...
ALGO
0.99994
3.247925
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06: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": "7668b32baf1c...
7957643f-0bcd-453e-8de4-fad6bdfca4ae
CyFI-Lab-Public/RetroScope
external/openfst/src/include/fst/union.h
// union.h // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // ...
ALGO
0.963774
7.150406
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2016-05-15T23:49:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 120, "forks": 43, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "5ed843...
44687ed8-fb16-4d23-ac3b-42353ec182a5
tongzx/nt5src
Source/XPSP1/NT/multimedia/directx/dxg/d3d8/util/d3dutil.cpp
//---------------------------------------------------------------------------- // // d3dutil.cpp // // Miscellanous utility functions. // // Copyright (C) Microsoft Corporation, 1997. // //---------------------------------------------------------------------------- #include "pch.cpp" #pragma hdrstop #include <span.h>...
TOOL
0.992462
3.756497
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-10-12T04:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1012, "forks": 555, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "648b8...
51475c84-a74a-41ef-bc96-636a5c37ce91
hms-dbmi/scde
src/jpmatLogBoot.cpp
#include "jpmatLogBoot.h" #include <cmath> using namespace Rcpp ; // maximum and minimum values of negative binomial theta (size) that will be considered #define MIN_THETA 1.0e-2 #define MAX_THETA 1.0e+3 SEXP jpmatLogBoot(SEXP Matl, SEXP Nboot, SEXP Seed){ Rcpp::List matl(Matl); int nrows=Rcpp::as<Rcpp::Num...
ALGO
0.998601
3.658176
{ "github_metadata": { "branch": "main", "commit_count": 157, "repo_created_at": "2015-05-06T16:53:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 175, "forks": 66, "issues": 43, "pull_requests": 0 }, "file_meta": { "content_id": "711cd99...
f7568094-bcfb-47e3-b607-cb45b8d9402c
Morwenn/cpp-sort
include/cpp-sort/sorters/insertion_sorter.h
/* * Copyright (c) 2015-2021 Morwenn * SPDX-License-Identifier: MIT */ #ifndef CPPSORT_SORTERS_INSERTION_SORTER_H_ #define CPPSORT_SORTERS_INSERTION_SORTER_H_ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include <functional> #i...
ALGO
0.999252
7.292578
{ "github_metadata": { "branch": "1.x.y-develop", "commit_count": 1748, "repo_created_at": "2015-08-01T11:58:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 661, "forks": 61, "issues": 40, "pull_requests": 0 }, "file_meta": { "content_id...
f4f8111d-07d6-4e8d-b45f-df1e3d367409
SmiteshArolkar/SE_LAB
OOPS/_LAB_/exp4_d.cpp
#include <iostream> #include <string.h> using namespace std; class string1 { char str[30]; public: string1() { strcpy(str, ""); } string1(char *s) { strcpy(str, s); } string1 operator +(string1 &s) { string1 s1; char temp[30]; strcpy(temp,str...
ALGO
0.99726
3.350002
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2022-09-20T11:57:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27792b1a7...
be70a5aa-93a6-4952-b52d-2a2d81e46170
dillongoostudios/goo-engine
intern/cycles/integrator/adaptive_sampling.cpp
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation * * SPDX-License-Identifier: Apache-2.0 */ #include "integrator/adaptive_sampling.h" #include "util/math.h" CCL_NAMESPACE_BEGIN AdaptiveSampling::AdaptiveSampling() {} int AdaptiveSampling::align_samples(int start_sample, int num_samples) const { if (!use...
ALGO
0.971402
7.309407
{ "github_metadata": { "branch": "goo-engine-main", "commit_count": 132039, "repo_created_at": "2021-05-08T09:53:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1109, "forks": 148, "issues": 44, "pull_requests": 6 }, "file_meta": { "conte...
b5f5b0d0-352b-448e-9f32-1ef1c7b4fbf1
ssjjss1/ssjjss-develop
C++17/백준/Gold/14938. 서강그라운드/서강그라운드.cc
#include<iostream> using namespace std; const int inf = 1e9 + 4; int n, m, r; int a[104], d[104][104]; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m >> r; fill(&d[0][0], &d[0][0] + 104 * 104, inf); for (int i = 1; i <= n; i++) { cin >> a[i]; d[i][i] = 0; ...
ALGO
0.999977
4.142119
{ "github_metadata": { "branch": "main", "commit_count": 770, "repo_created_at": "2024-03-19T13:40:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "409b5ad5a2...
b821270d-8cce-4340-9ea5-c4ea01317a93
Fiaze-SHU/XPSC-Problem-Solving
Week 2/Day 1/Day 2/C_Cypher.cpp
#include <bits/stdc++.h> #define int long long #define float double #define endl '\n' using namespace std; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int n; cin >> n; vector<int> v(n); for (int i = 0; i < n; i...
ALGO
0.999759
4.791833
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2024-10-26T08:14: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": "bb57fecce59...
b381c9ad-33fd-4f74-b1b8-23efa7d215d3
CodeHarshh/DSA-Leetcode
0394-decode-string/0394-decode-string.cpp
class Solution { public: ///************* // ✅ 3–4 Line Logic Summary of Full Code (decodeString): // Traverse the input string, pushing characters onto a stack. // When ] is found, pop to get the string inside [...] and the number before // it. Repeat the extracted string k times and push it back...
ALGO
0.99965
6.3525
{ "github_metadata": { "branch": "main", "commit_count": 1154, "repo_created_at": "2024-06-18T19:38: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": "8ab33b663...
faa1211d-e406-4924-8358-2ccfbf70d818
MosheGroot/Algorithms-partice
2_Sorting-algorithms/6_quick_sort_with_3-way_partitioning.cpp
#include <iostream> #include <cassert> #include <cstdlib> #include <ctime> static constexpr int N = 5; static int* array = new int[N]; void FillArray() { std::srand(std::time(nullptr)); for (int i = 0; i < N; ++i) array[i] = std::rand() % 10; } void PrintArray() { for (int i = 0; i < N; ++i) ...
ALGO
0.998926
6.016611
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-09-14T09:23: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": "6dfc43eb23f...
2781fed2-79db-4567-8d85-33a7e133813d
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p02802/s584613595.cpp
#include <iostream> #include <string> #include <algorithm> #include <utility> #include <unordered_set> #include <vector> #include <list> #include <string> #include <iterator> #include <deque> #include <array> #include <forward_list> #include <queue> #include <stack> #include <set> #include <map> #include <unordered_...
ALGO
0.999792
3.434889
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "3add77392c...
cf2c2b4f-1860-49dd-979a-d091cc5b4d4c
namhai0510/C--
C--/The least round way.cpp
#include <bits/stdc++.h> using namespace std; #define nothing ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define endl "\n" #define ll long long #define ull unsigned long long #define fi first #define se second #define pb push_back const ll oo = 1e13; const ll mod = 1e9 + 7; const int maxn = 1e6;...
ALGO
0.999978
3.63869
{ "github_metadata": { "branch": "main", "commit_count": 617, "repo_created_at": "2022-11-05T14:19:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d025b00637...
90a8eae4-bb03-46c3-bef2-723bb562079c
rahulgovind/hirschberg_4russians
helpers.h
// // Created by <NAME> on 15/12/18. // #ifndef PROJECT_HELPERS_H #define PROJECT_HELPERS_H #include <bits/stdc++.h> using namespace std; class Encoder { private: map<char, char> e; map<char, char> d; public: Encoder(string s) { char present[256]; for (int i = 0; i < 256; i++) { present[...
TOOL
0.981822
5.032759
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-12-07T07:25:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83b1b0c31...
75b53bd4-dcc4-4cd8-a3d4-d6d77ff5c26c
Davidlihuang/leetCodeSolve
code/20 有效的括号.cpp
/***题目描述 * ** */ #include <iostream> #include <stack> #include <string> #include <unordered_map> using namespace std; bool isValid_solution2(string s) { stack<char> strStack; int strLen = s.size(); unordered_map<char, char> pairs = { {')', '('}, {'}', '{'}, {']', '['}}; if (s...
ALGO
0.999629
5.281256
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-09-18T01:39: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": "256a6bb55b...
2f488b7b-b0d1-4604-a844-f0428fb1c7ee
Anujjha19/cpp
B_K_Sum_Paths.cpp
#include <iostream> #include <queue> using namespace std; struct Node { int data; Node *left, *right; }; Node *newNode(int data) { Node *temp = new Node; temp->data = data; temp->left = temp->right = NULL; return temp; } void solveSumK( Node* root , int &count,int k , vector<int> path ){ ...
ALGO
0.999962
4.866566
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2023-01-10T13:26:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b0201c44...
40829792-5dbc-41e9-b7a1-f80505b981ad
jiangyigithub/myalgo
cpp/29-49_ugly_numbers_s1.cpp
/* * File: sfo_49_ugly_numbers_s1.cpp * Created Time: 2021-12-09 * Author: Krahets (<EMAIL>) */ #include "include.hpp" // ===== Solution Code ===== class Solution { public: int nthUglyNumber(int n) { int a = 0, b = 0, c = 0; int dp[n]; dp[0] = 1; for(int i = 1; i < n; i++) { ...
ALGO
0.999995
5.447107
{ "github_metadata": { "branch": "master", "commit_count": 774, "repo_created_at": "2023-06-15T01:32:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f226755...
55cbe37b-45b7-4e6c-8cf7-76db7a36f638
leideng/leetcode
300/C++/300_Longest_Inc_Subseq.cpp
/** Problem Given an unsorted array of integers, find the length of longest increasing subsequence. For example, Given [10, 9, 2, 5, 3, 7, 101, 18], The longest increasing subsequence is [2, 3, 7, 101], therefore the length is 4. Note that there may be more than one LIS combination, it is only necessary for you to r...
ALGO
0.999985
6.072539
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2016-06-08T09:23: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": "845a8aec3...
fea6684a-c39e-4b42-919b-ceffcafc5ef3
iscas-depso/ReDoSExpUniversalEnvironment
tools/GREWIA/Solver/DetectAmbiguity_WithLookAround/DetectAmbiguity.cpp
#include <cmath> #include <map> #include <list> #include <bitset> #include <queue> #include <iostream> #include <fstream> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <random> #include <openssl/evp.h> #include <queue> #include <chrono> #include "DetectAmbiguity.h" namespace solverbin{ ...
ALGO
0.995428
3.521701
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2025-06-16T07:01:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0b75def6863...
cde94e50-d803-4870-ad2b-b56ad5834dd5
theodorusyw/Algo
Class/HackerRandRemidial/1.cpp
#include <stdio.h> #include <string.h> #include <ctype.h> // awalnya saya mencoba tanpa mengecek alfanumerik tapi di beberapa test case salah jadi saya mengubah code menjadi terdapat pengecekan simobol atau alfanumerik int main() { char s[1001]; scanf("%[^\n]", s); // input string int left = 0, right = s...
ALGO
0.999967
3.696196
{ "github_metadata": { "branch": "main", "commit_count": 150, "repo_created_at": "2024-10-28T12: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": "a277cbd588...
4fa14dfb-bb72-4f67-a8f3-2ced2c040a73
sianke1991/Programmers
ccclass0.cpp
/** 클래스 **/ #include <bits/stdc++.h> using namespace std; /** * 2차원 벡터 */ class Vector { public: //접근 제한자 int x, y; //생성자 constructor (생성자를 별도로 정의하지 않으면 디폴트 생성자가 생성된다.) Vector() { this->x = 0; this->y = 0; } Vector(int x, int y) { ...
TOOL
0.989285
4.685058
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-12-03T04:37: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": "c002f91f75...
494ce6fc-7136-41e4-abf8-8cb5c58277b5
nmhienbn/Competitive-Programming
Mr.Minh/08.02.2022/pie/pie.cpp
#include <bits/stdc++.h> #define fi(i, a, b) for(int i = (a), _b = (b); i <= _b; i++) #define fid(i, a, b) for(int i = (a), _b = (b); i >= _b; i--) #define gb(x, i) (((x) >> (i)) & 1) #define pii pair<int,int> #define pb push_back #define ll long long #define Irelia "pie" const int maxn = 1e3 + 5; using namespace std; ...
ALGO
0.999932
3.496642
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-02-11T14:40:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d52bbaa1124...
a3438723-ce63-46fd-8dae-48b65ae869fc
Syed-56/DSA
Linked-List/Recursion/04_reverse-nodes-in-k-group/optimize.cpp
#include <iostream> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int x) : val(x), next(nullptr) {} }; // Reverse a singly linked list ListNode* reverseList(ListNode* head, int k) { ListNode* curr = head; for(int i=0; i<k; i++) { if(!curr) return head; //bas...
ALGO
0.999328
5.449155
{ "github_metadata": { "branch": "main", "commit_count": 201, "repo_created_at": "2025-06-26T16:56:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "757108be05...