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 |
|---|---|---|---|---|---|---|---|
76ce4825-4014-448c-9c7a-0ec5c99f89eb | mindspore-ai/mindspore | mindspore/lite/src/litert/kernel/cpu/fp32/cumsum_fp32.h | /**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | ALGO | 0.994418 | 7.533236 | {
"github_metadata": {
"branch": "master",
"commit_count": 83896,
"repo_created_at": "2020-02-11T08:43:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4559,
"forks": 740,
"issues": 181,
"pull_requests": 20
},
"file_meta": {
"content_id": ... |
d6e1a843-431a-429e-8841-f3cbfc95e36c | BBJDH/CodingTest_Library | CodingTest/BaekJoon/자료구조/덱/20923 - 숫자 할리갈리 게임.cpp | /*
*20923 - 숫자 할리갈리 게임
*
*게임 규칙을 잘읽으면 되는 문제다
*
*유의할점 1
*각 상대가 한장을 뽑고 그 상황에서 종을 울릴지 판단하는 것을 1회 진행으로 한다
*즉 도도가 내고 수연이 냈다면 이미 게임 진행은 2회가 되었다.
*
*유의할점 2
*입력받은 카드를 스택처럼 맨 나중입력부터 카드를 제출한다
*즉 맨 마지막 입력 받은 수가 제일 위에서 오픈된다
*
*진행
*
*덱을 이용한다. 카드의 제출은 스택으로 top을 뽑아서 내고,
*그라운드의 카드를 회수할때는 그라운드의 카드를 front에 push해야한다
*
*... | ALGO | 0.999685 | 4.812181 | {
"github_metadata": {
"branch": "master",
"commit_count": 321,
"repo_created_at": "2022-06-03T04:11: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": "4ef656c8... |
6cf624c3-baa4-40b8-b34e-bc8f5366431f | KaizynX/Code | HDU/2020081302.cpp | /*
* @Author: Kaizyn
* @Date: 2020-08-13 14:27:01
* @LastEditTime: 2020-08-13 20:44:17
*/
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#include <bits/stdc++.h>
// #define DEBUG
using namespace std;
const double eps = 1e-7;
con... | ALGO | 0.999868 | 4.698499 | {
"github_metadata": {
"branch": "master",
"commit_count": 351,
"repo_created_at": "2018-02-19T10:48:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "097cd54c... |
07026d4b-e36c-4f24-be25-0d69a90726b7 | forthright48/code-library | code_templates/dice.cpp | //The dice is sitting on its bottom and I can see the front.
struct DICE {
int bottom = 0, top = 1, front = 2, right = 3, back = 4, left = 5; //Names of Faces
int face[6]; //Value of faces
void assign ( int _bot, int _top, int _front, int _right, int _back, int _left ) {
face[0] = _bot; face[1] = _... | ALGO | 0.999828 | 4.068363 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-02-16T18:46:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 55,
"forks": 23,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "18e12f6... |
1f390205-ddb1-40bc-99a0-8815635b301f | NicolayHeavyFog/myFirstRep | Anagram/main.cpp | //
// main.cpp
// Anagram
//
// Created at 02.05.2021.
//
// The task - find anagram (A words which can will be equal via transformation), for example: 'tea' and 'eat'. Input - a pair words. One of the way - it's "sort". We can regularize a words which have the same letters. That's it.
// Задача - найти в словах ... | ALGO | 0.999412 | 4.461538 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-11-26T10:22: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": "eaa3a356c1... |
3f68ed36-8cb2-4f41-ad85-f834fb7f917a | acmeism/RosettaCodeData | Task/Pascals-triangle-Puzzle/C++/pascals-triangle-puzzle.cpp | #include <iostream>
#include <iomanip>
inline int sign(int i) {
return i < 0 ? -1 : i > 0;
}
inline int& E(int *x, int row, int col) {
return x[row * (row + 1) / 2 + col];
}
int iter(int *v, int *diff) {
// enforce boundary conditions
E(v, 0, 0) = 151;
E(v, 2, 0) = 40;
E(v, 4, 1) = 11;
E(... | ALGO | 0.999956 | 5.045377 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2013-04-08T20:08:30.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 518,
"forks": 177,
"issues": 12,
"pull_requests": 3
},
"file_meta": {
"content_id": "1fab99c... |
5271d5f7-00d4-4a1b-893f-843245c45567 | kvrancic/Alghoritms-and-data-structures | lab2/13.cpp | #include<iostream>
using namespace std;
class Vozilo{
string model;
int year;
public:
Vozilo(){};
Vozilo(string model, int year) : model(model), year(year) {}
string getModel(){return model;}
int getYear(){return year;}
bool operator < (const Vozilo &other){
if (model... | ALGO | 0.996118 | 4.731884 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-02-19T15:08: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": "fb50ab6751... |
c455657c-6a39-4cc5-abbe-7eb7f3410d8a | dipta007/Competitive-Programming | CS academy/C.cpp | #pragma comment(linker, "/stack:640000000")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <iterator>
#include <list>
#include <map... | ALGO | 0.999912 | 3.529545 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2016-03-27T22:30:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "93eb3da66... |
94cab63a-23da-433a-a4d0-fee5ecfc7b29 | Liu-Cheng/bfs-using-vivado-hls | adm7v3/v10.fixStuck.cpy/src/depricated/hkuHmmult_host.cpp |
//#include <sys/types.h>
//#include <stdio.h>
//#include <CL/cl.h>
#include <iostream>
#include <cmath> // for log2
#include <clblast_half.h>
#include "xcl.h"
#include "oclHelper.h"
#include "cmdlineparser.h"
//#include "hls_half.h" // for fp_struct<half>, hls::numeric_limits
//#include "hls/utils/x_hls_utils.h"
#i... | ALGO | 0.98579 | 4.272311 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2018-01-27T02:01:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a1165d23... |
3d4ff6ac-f5e1-41b3-a0fd-316bbc8ad720 | pedris11s/coj-solutions | lmm-p1596-Accepted-s350256.cpp | //1552_fibonacci calculation
#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
#define c11 first.first
#define c12 first.second
#define c21 second.first
#define c22 second.second
#define MKP(a, b) make_pair((a), (b))
typedef long long ll;
typedef pair <ll, ll> pii;
typedef pair <pii, ... | ALGO | 0.999935 | 4.037924 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-12-05T22:51:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5a40eb580e... |
b2f0e6ce-a9be-4a4c-b988-dd5dde4c1750 | shunsaker/Capstone | Capstone/Capstone/IdealBinaryMask.cpp | #include "stdafx.h"
#include "IdealBinaryMask.h"
IdealBinaryMask::IdealBinaryMask(Signal& signal1, Signal& signal2) : signal1(signal1), signal2(signal2)
{
int shorter = MIN(signal2.SAMPLES, signal1.SAMPLES);
signal1.trim(shorter);
signal2.trim(shorter);
//Cochleagram* coch1 = new Cochleagram(signal1, signal1.SAM... | ALGO | 0.966428 | 4.879755 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2015-02-03T14:14:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "74ed01fa0... |
19abdf73-3666-4f47-8c5b-fd1758e35c73 | Anirudh-48/Parallelization-of-Image-Encryption | serial.cpp | #include <iostream>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <fstream>
#include <math.h>
#include <opencv2/opencv.hpp>
#include <opencv2/core/hal/interface.h>
using namespace std;
using namespace cv;
uint8_t sbox[16][16] = {
{0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
0x30, 0x0... | ALGO | 0.977501 | 3.430298 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2021-09-03T18:56:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d93db00c6b6... |
45a20f6f-4390-45f9-998c-ca67b5bc81dd | opencog/moses | moses/moses/scoring/bscores.cc | /*
* moses/moses/scoring/bscores.cc
*
* Copyright (C) 2002-2008 Novamente LLC
* Copyright (C) 2012,2013 Poulin Holdings LLC
* Copyright (C) 2014 Aidyia Limited
* All Rights Reserved
*
* Written by <NAME>, <NAME>, <NAME>
*
* This program is free software; you can redistribute it and/or modify
* it under the t... | ALGO | 0.994979 | 5.782985 | {
"github_metadata": {
"branch": "master",
"commit_count": 16698,
"repo_created_at": "2015-04-26T19:15:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 131,
"forks": 85,
"issues": 13,
"pull_requests": 0
},
"file_meta": {
"content_id": "250... |
a54f44fd-2cd9-4c6d-b2e1-35633e9b1af7 | apdaza/bookprogramming | ejercicios/c++/ejercicio024.cpp | #include <iostream>
#include <string.h>
#include <stdlib.h>
using namespace std;
int main(){
double t1, t2;
string entrada;
cout << "Ingrese la temperatura que desea convertir. \nEjemplo: (35 c - 74 f): ";
getline(cin, entrada);
if(entrada.find('c') != string::npos){
entrada.replace(entrada.find('c'), 1,... | TOOL | 0.967603 | 4.086534 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-09-26T16:28: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": "a51e55b484... |
3961d1d6-fc42-4ad5-b42d-cc3628cc1486 | kong1211/COMP3016 | LearnOpenGL/PerlinNoise.h | #pragma once
#pragma once
#include<vector>
double fade(double t)
{
return t * t * t * (t * (t * 5.5 - 15) + 10);
}
double lerp(double t, double a, double b)
{
return a + t * (b - a);
}
double grad(int hash, double x, double y, double z)
{
int h = hash & 15; //转换为4bit的哈希码
double u = h < 8 ? ... | ALGO | 0.983388 | 4.283937 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-01-02T15:21: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": "9ac72997ed9c... |
ada9d7b9-62ac-443c-83e6-3587e2a81484 | ishandutta2007/codeforces-a | allvik06/normal/1606/E.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <array>
#include <cassert>
#include <map>
#include <set>
using namespace std;
#define int long long
const int mod = 998244353;
const int MAXN = 1010;
int power(int a, int n) {
if (n == 0) return 1;
if (n & 1) return power(a, n - 1) * a % mod... | ALGO | 0.999971 | 4.961108 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51: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": "e3991414de7d... |
e383dc87-01ce-49d5-8362-d803c1bac427 | yirzhou/UVa | Longest_run_on_a_snowboard_10285.cpp | #include <bits/stdc++.h>
using namespace std;
int R, C, N;
typedef vector<int> vi;
typedef pair<int, int> ii;
vector<vi> G;
vector<ii> dirs = { { 0, 1 }, { 0, -1 }, { 1, 0 }, { -1, 0 } };
char S[50];
int memo[100][100];
int f(int i, int j)
{
if (memo[i][j] != -1)
return memo[i][j];
int ans = 1;
... | ALGO | 0.999371 | 4.26872 | {
"github_metadata": {
"branch": "main",
"commit_count": 381,
"repo_created_at": "2022-11-03T03:11:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0e0ab85c0a... |
6e82d7ec-a0e1-4863-b981-40228e800e83 | SubodhShil/DSA-Problem-Solving | Competitive Programming/Course/Phase 2/Class 5 Dynamic Programming/Minimum_steps_to_reach_1.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e6;
int steps[N];
bool saved[N];
/// complexity: O(3^n)
/* int min_steps_recursive(int i)
{
if (i == 1)
return 0;
int ans = min_steps_recursive(i - 1) + 1;
if (i % 2 == 0)
ans = min(min_steps_recursive(i /... | ALGO | 0.999944 | 4.04518 | {
"github_metadata": {
"branch": "main",
"commit_count": 433,
"repo_created_at": "2023-03-09T15:45:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1757a481fb... |
d67ba59c-3654-46c7-bb6c-4cd900681686 | devKiam/HackerRank | Breadth First Search: Shortest Reach.cpp | #include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
void bfs(ll start, vector<ll> adjList[], vector<ll> &dis, vector<ll> &parent)
{
queue<ll> q;
q.push(start);
dis[start] = 0;
while (!q.empty())
{
ll u = q.front();
q.pop();
fo... | ALGO | 0.999864 | 4.158443 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2020-10-16T13:25:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4408779ce4ba... |
afa20a28-a552-4abd-a582-979714e6b4bc | kushuu/competitive_programming_all | love babbar series/Strings/print all subs.cpp | /**********************************************
Author: kushuu File: print all subs.cpp Date: Sat Nov 07 2020
**********************************************/
#include <bits/stdc++.h>
//shorts
#define ll long long int
#define sll stack<long long int>
#define vll vector<long long int>
#define ld long double
#define... | ALGO | 0.999523 | 4.960887 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2021-02-01T09:09:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02769a582... |
df9474c2-bdbd-4f45-8110-0d072a300963 | DiegoBV/Segundo-Curso-Primer-Cuatrimestre | EDA/MergeSort/MergeSort/Source.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
void mergeSort(vector < int >& v, int ini, int fin);
void merge(vector < int >& v, int ini, int mid, int fin);
void rellenaVector(vector<int>& v);
int main() {
//Atributes
int n; //numero de vectores a rellenar
int i = 0;
vector <int> v... | ALGO | 0.999837 | 4.708822 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2017-11-12T18:40:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "583169d9c... |
8a2c78a9-1702-4679-8b62-65102136d2ed | HolicKW/codetree-TILs | 241030/마을 구분하기/seperate-village.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define MAX 25
int arr[MAX][MAX];
bool visited[MAX][MAX] = {false};
vector<int> vec;
int cnt = 0;
int n;
bool inRange(int x, int y) {
return x >= 0 && x < n && y >= 0 && y < n;
}
bool canGo(int x, int y) {
if(!inRange(x,y)){
... | ALGO | 0.99991 | 4.6394 | {
"github_metadata": {
"branch": "main",
"commit_count": 1735,
"repo_created_at": "2024-07-17T06:00: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": "94b8aa29e... |
db75ac9e-0a9c-47eb-bc17-50048de44965 | kriepiekrollie/cp-solutions | saco/2016/paths/paths.cpp | #pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,avx2,fma,bmi,bmi2")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, m, k;
vector<pair<int, ll>> g[2001];
set<int> bad[2001][2001];
ll dist[2001][2001];
bool vis[2001][2001];
pair<int, int> par[2001][2001];
int main()
{
cin... | ALGO | 0.999986 | 4.020293 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2023-10-10T15:53: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": "049f9558a9c... |
57652879-0f05-4b72-b033-6ca15e25cc43 | jaimemin/programmers | 혼자서 하는 틱택토.cpp | #include <string>
#include <vector>
#include <algorithm>
using namespace std;
const int SIZE = 3;
typedef struct
{
int oCnt, xCnt;
} State;
State getWinnerCnts(vector<string> &board)
{
int oCnt = 0;
int xCnt = 0;
if (board[0][0] != '.'
&& board[0][0] == board[1][1]
&& board[0][... | ALGO | 0.999948 | 5.236935 | {
"github_metadata": {
"branch": "main",
"commit_count": 506,
"repo_created_at": "2021-09-03T13:45:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "57fd09a40f... |
fe41e6f5-6d51-4fac-9b1e-599cb5570f2e | MartinBrazdil/AI | Desktop/BanditActionSelection.h | #pragma once
#include "KBandit.h"
#include "HyperparameterEvolution.h"
#include "GreedyEvaluation.h"
#include "RU.h"
#include "EGEVMC.h"
#include "EGFVMC.h"
#include "GEVMC.h"
#include "GFVMC.h"
#include "OSEGEVMC.h"
#include "OSEGFVMC.h"
#include "OSGEVMC.h"
#include "OSGFVMC.h"
#include <fstream>
#include <string>... | ALGO | 0.997046 | 5.460724 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-10-05T14:14: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": "2e069804c1... |
8527d62f-2dbf-49c4-8628-ee060bcb0605 | hwanginhanoi/COS30008 | Final/TernaryTreePrefixIterator.h |
// COS30008, Final Exam, 2022
#pragma once
#include "TernaryTree.h"
#include <stack>
template<typename T>
class TernaryTreePrefixIterator
{
private:
using TTree = TernaryTree<T>;
using TTreeNode = TTree*;
using TTreeStack = std::stack<const TTree*>;
const TTree* fTTree; // terna... | ALGO | 0.944899 | 6.326103 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-12-29T07:37: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": "36de34e4dd85... |
e2bb55a4-6229-4d77-895a-7b98001d8362 | NFSZY/NCTU-network-programming-courseworks | hw1/main.cpp | /*
* Homework 1 for NCTU network programming class
* ClawMachine simulation using Multi-thread
*
* Basic version(Only 1 clawmachine)
*
* Author: <NAME> <<EMAIL>>
*/
#include <iostream>
#include <vector>
using namespace std;
// ========== Class definition ==========
//
// ---------- CustomerStatus enumeration ... | ALGO | 0.998791 | 4.378945 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-10-19T02:07: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": "b3542dfeef... |
ebdb46b9-09e3-4c3b-be6c-b9bb5b4d2b02 | Ranisme/LAB1_OOP | b8.cpp | #include <bits/stdc++.h>
using namespace std;
const int Numday[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
class SaveMoney {
private:
string Id;
string Type;
string Name;
string CMND;
int Day, Month, Year;
double Money;
public:
bool IdCheck();
bool TypeCheck();
bool Na... | TOOL | 0.956744 | 3.579821 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-09-30T13:51: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": "86d64cc00052... |
eae66a79-2d31-4c84-b969-443fc5b5187e | ethanol25/CompetitiveProgramming | codeforces/A_Tender_Carpenter.cpp | #include <bits/stdc++.h>
using namespace std;
void solve() {
int n; cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
bool partition = false;
for (int i = 0; i < n-1; i++) {
int x = a[i];
int y = a[i+1];
if (x+x > y) {
i... | ALGO | 0.9998 | 5.090589 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-02-13T00:12: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": "84dd035e169a... |
1f1d09ef-2a55-4b3e-9eb1-c4dbd2c118a5 | NourEldeenM/2d-drawing-program | src/algorithms/LineDrawingAlgos/DDALineAlgorithm.cpp | #include "../DrawingAlgorithm.h"
#include <algorithm>
#include <cmath>
using namespace std;
#ifndef DDALINEALGORITHM_H
#define DDALINEALGORITHM_H
class DDALineAlgorithm : public DrawingAlgorithm
{
public:
DDALineAlgorithm()
{
setName((char *)"DDA Line Algorithm");
setRequiredPoints(2); // Star... | ALGO | 0.992094 | 5.717028 | {
"github_metadata": {
"branch": "main",
"commit_count": 99,
"repo_created_at": "2025-05-18T20:14:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "038b65094d4... |
0a4290c7-9c55-4b10-982f-960947b6f10b | rohitxofficial/CPP-Practice | Dynamic Programming/Number_of_balanced_Binary_Trees.cpp | #include <bits/stdc++.h>
using namespace std;
/*
MEMOIZATION
int numberOfBalancedBinaryTrees(int n, int *arr)
{
if (n <= 1)
return 1;
if (arr[n] != -1)
return arr[n];
int mod = (int)(pow(10, 9)) + 7;
int x = numberOfBalancedBinaryTrees(n - 1, arr);
int y = numberOfBalancedBinary... | ALGO | 0.999997 | 4.976602 | {
"github_metadata": {
"branch": "main",
"commit_count": 234,
"repo_created_at": "2021-07-22T12:06: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": "7df0ffb797... |
46086c57-8685-47fb-ad52-228bb66d51ff | lemrobotry/thesis | beam-search.cc | #include <Core/Parameter.hh>
#include <Core/Statistics.hh>
#include <Fsa/Application.hh>
#include <Fsa/Best.hh>
#include <Fsa/Compose.hh>
#include <Fsa/Input.hh>
#include <Fsa/Output.hh>
#include <Fsa/Permute.hh>
#include <Fsa/Project.hh>
#include <Fsa/Prune.hh>
#include <Fsa/Static.hh>
APPLICATION
// Uses Fsa::permu... | ALGO | 0.99944 | 6.994707 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-05-12T04:32: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": "b8095ae87f... |
beb9b4b6-0c5a-4ea4-a20f-9b98ab1e1eaf | mousyball/Data-Structure-and-Algorithm | Analysis of Algorithm/Reverse String.cpp | #include <iostream>
using namespace std;
#define swap(a,b) { a^=b; b^=a; a^=b; }
void reverseStringIP(char* str)
{
char *end = str;
while (*end++ != '\0');
for (end -= 2; end > str; --end, ++str) {
swap(*end, *str);
}
}
char* reverseStringNIP(char* str)
{
int length = 0;
for (char* ptr = str; *ptr != '\0'; +... | ALGO | 0.999142 | 5.18589 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2018-03-03T14:38: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": "e3be8ac9d... |
26252d67-7fce-486d-9c34-86660870a248 | ishandutta2007/codeforces-h | hyperhyperhypercubelover/normal/760/B.cpp | #include <cstdio>
#include <algorithm>
using namespace std;
int main() {
long long t;
int l, r, m;
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
b -= a;
l = 0;
r = 1000000000;
while (l < r) {
m = l + r + 1 >> 1;
t = (m > c ? 1ll * (m + m - c) * (c - 1) / 2 : 1ll * m * (m - 1) / 2) +
(m > a - c ? 1ll * (m +... | ALGO | 0.999936 | 3.042277 | {
"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": "71dc254ae17a... |
3cd7904c-3338-47f5-9c7f-6935b3b495fb | ImJiyun/Algorithm-Solving | 백준/Silver/15353. 큰 수 A+B (2)/큰 수 A+B (2).cc | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
// 큰 수 덧셈 함수
string addBigNumbers(const string& A, const string& B) {
string result = "";
int carry = 0;
int lenA = A.size(), lenB = B.size();
// 두 숫자를 오른쪽부터 왼쪽으로 한 자리씩 더함
for (int i = 0; i < max(lenA, lenB); i++) {
... | ALGO | 0.999969 | 5.727371 | {
"github_metadata": {
"branch": "main",
"commit_count": 92,
"repo_created_at": "2024-08-07T11:23:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "75678d26353... |
38d6efff-14c0-479e-bd7d-1d2a56d07d59 | PrajyotDaphal/Aruduino-Projects | Projects/dynamic_plant_watering_system.ino | #include <Servo.h>
// Change the dry and web value according to you
#define dry 500
#define wet 277
#define Relay_Pin 13
const int sensorPins[] = {A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10};
const int servoPins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
const int numSensors = sizeof(sensorPins) / sizeof(sensorPins[0... | TOOL | 0.942722 | 5.411839 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2025-02-04T17:51: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": "6d2e3470f62... |
358361be-da87-4b40-bbe0-1f6cfee50bea | GfKbYu/Cforam | LO13/Server_0/server_0.h | #include <x86intrin.h>
#include <cmath>
#include <vector>
#include <iostream>
#include <iomanip>
#include <unordered_map>
#include <../boost/asio.hpp>
#include "../../DPF-CPP/AES.h"
#include "../../DPF-CPP/dpf.h"
#include "../../TW-PIR/utils.h"
#include "../../TW-PIR/alignment_allocator.h"
#include "../../Hash-Function... | ALGO | 0.998698 | 3.679795 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2025-04-16T02:18: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": "07e985137e2... |
bb85278b-e512-4ad3-865f-61d06620a3e8 | yoon1/quiz.algorithm-solve | cpp/BACKJOON/stack/10828_스택.cpp | #include <iostream>
#include <vector>
#include <stack>
using namespace std;
stack<int> stk;
int main() {
int n;
string input;
cin >> n ;
for (int i = 0; i < n; ++i) {
cin >> input;
// split
if (input.compare("push") == 0) {
int num;
cin >> num;
... | ALGO | 0.997988 | 4.746266 | {
"github_metadata": {
"branch": "master",
"commit_count": 178,
"repo_created_at": "2019-09-18T02: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": "860f0ca1... |
e161c49e-fea1-41bc-bb5c-1fceca586ee1 | Miracle-cl/Algorithms | DFS/PalindromePartitioning.cpp | #include <iostream>
#include <string>
#include <vector>
using std::vector;
using std::string;
class Solution {
public:
vector<vector<string>> partition(string s) {
vector<vector<string>> res;
vector<string> temp;
dfs(0, s, temp, res);
return res;
}
void dfs(int start, con... | ALGO | 0.999966 | 5.082686 | {
"github_metadata": {
"branch": "master",
"commit_count": 91,
"repo_created_at": "2017-05-11T08:45:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "26071997b... |
948724b5-43f9-482f-acde-8abc7ccdea99 | daily1313/algorithm | 백준 알고리즘/2206.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <tuple>
using namespace std;
int a[1001][1001]; // 입력
int d[1001][1001][2]; // d[x][y][z] : x,y (행, 열), z (벽을 부순 횟수)
int mov[4][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
// 빈칸 -> 빈칸 (ok), 빈 칸 -> 벽 (가능할 수 있다.), 벽 -> 빈 칸(항상), 벽->벽(x, 벽을 한번만 부술 시 있기 때문이다.)... | ALGO | 0.999982 | 3.72901 | {
"github_metadata": {
"branch": "main",
"commit_count": 527,
"repo_created_at": "2022-01-10T06:59:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9848b713be... |
9667bc18-7cde-406b-b0bb-3b5d0e2e2152 | anzaika/guidance | libs/phylogeny/tamura92.cpp | // $Id: tamura92.cpp 962 2006-11-07 15:13:34Z privmane $
#include "tamura92.h"
#include "errorMsg.h"
// This implementation was copied from the Bio++ Phyl library (by <NAME>) - file T92.cpp
tamura92::tamura92(const MDOUBLE theta,
const MDOUBLE TrTv)
: _theta(theta), _TrTv(TrTv) {
_freq.resize(4);
changeT... | ALGO | 0.999821 | 4.696444 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-08-28T12:48:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 3,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0801dd9... |
c921ba9d-c4b5-4aee-ae53-a6a01e0f2d7b | cristicretu/cp | infoarena/sah/sah.cpp | #include <bits/stdc++.h>
std::ifstream fin("sah.in");
class OutParser {
#pragma warning(disable : 4996)
private:
FILE* fout;
char* buff;
int sp;
void write_ch(char ch) {
if (sp == 50000) {
fwrite(buff, 1, 50000, fout);
sp = 0;
buff[sp++] = ch;
} else
buff[sp++] = ch;
}
publ... | ALGO | 0.999962 | 3.742179 | {
"github_metadata": {
"branch": "main",
"commit_count": 281,
"repo_created_at": "2020-12-21T14:33:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "23cf70909f... |
53d036d7-d240-4cc3-b528-7d9f860de195 | visith1577/cpp_practice | tutorial/q4.cpp | #include <iostream>
using namespace std;
class Counter {
int a, b;
public:
Counter(int x, int y)
{
a = x;
b = y;
}
int getCount1() const
{
return a;
}
int getCount2() const
{
return b;
}
Counter operator ++(){
++a;
++b;
... | ALGO | 0.988677 | 5.17362 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-09-22T08:18:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2673c6ba35b6... |
50b19d07-9e0e-47b8-a2ad-1e32ab24dd30 | Takumi-Ozeki-1g/AtCoder | DP-practice/N-Slimes.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define reps(i,n) for(int i=1;i<=(int)(n);i++)
#define rrep(i,n) for(int i=((int)(n)-1);i>=0;i--)
#define rreps(i,n) for(int i=((int)(n));i>0;i--)
#define rep2(i,s,n) for(int i=(s);i<(int)(n);i++)
#define pb... | ALGO | 0.999988 | 3.376195 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2022-05-20T01:19:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "958b391e1e1... |
bdf621f2-ef0f-44ec-b567-34b3a7f576e7 | lichenk/AlgorithmContest | topcoder/FractalPicture.cpp | #include <bits/stdc++.h>
#include <assert.h>
using namespace std;
typedef long long ll;
//typedef long double ld;
typedef double ld;
typedef pair<ll,ll> pll;
#define PB push_back
#define MP make_pair
const ll MOD = 1000000007LL;
const ll INF = 1LL<<60LL;
template<typename T> inline bool chkmax(T &aa, T bb) { return aa ... | ALGO | 0.998861 | 3.872602 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2018-07-29T03:21:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "adfa4a9e2... |
4a75333e-4cdb-433e-9f8c-900b8c545096 | ayush8303/International-Institute-of-Information-Technology-Pune | 13 - Hashing/Count Rectangles.cpp | #include <bits/stdc++.h>
using namespace std;
#define Point pair<int, int>
#define x first
#define y second
int count_rectangles(vector<Point> &pts)
{
// insert all the points in the set
set<Point> st;
for (Point p : pts)
{
st.insert(p);
}
// Two points + look up for other two
int ans = 0;
for (i... | ALGO | 0.999833 | 5.03743 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2025-01-07T13:54:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e4fbc022e... |
eaf52f09-027c-4d8c-821a-07ae9dec10e8 | ouxianghui/ezcam | src/3rdparty/opennurbs/opennurbs_mesh.cpp | /* $NoKeywords: $ */
/*
//
// Copyright (c) 1993-2007 <NAME> & Associates. All rights reserved.
// Rhinoceros is a registered trademark of <NAME> & Assoicates.
//
// THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
// ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
// MERCHANTA... | TOOL | 0.957433 | 5.112662 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2021-03-26T02:46:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 61,
"forks": 37,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "50b4c89cc5... |
5f136571-99b9-4994-88fb-f5500d0c8abe | fread04/ThesisMessenger | client/ChatAppClient/src/CryptoUtils.cpp | #include "../include/CryptoUtils.h"
#include <QtMath>
#include <QRandomGenerator>
#include <QStringList>
#include <QStandardPaths>
#include <QDir>
#include <QFile>
#include <QTextStream>
#include <QMessageBox>
#include <QDebug>
#include <chrono>
// ✅ Miller–Rabin Test with Logs
bool CryptoUtils::isPrime(long long n, ... | ALGO | 0.993757 | 5.469536 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-04-10T12:44: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": "6260c00b9d90... |
3301ef88-ebc6-405e-8e2b-a49ffcb51710 | LineageOS/android_external_perfetto | src/profiling/symbolizer/local_symbolizer.cc |
/*
* Copyright (C) 2019 The Android Open Source Project
*
* 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 ap... | TOOL | 0.944114 | 5.752866 | {
"github_metadata": {
"branch": "lineage-18.1",
"commit_count": 24640,
"repo_created_at": "2018-08-10T12:54:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b... |
9962912d-036b-4925-a7f2-b5db9f6c4039 | Pranay-Prasad/DSA | linkedlist/intro.cpp | #include <bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node* next;
node(int val)
{
data = val;
next = NULL;
}
};
// void insertathead(node* &head,int val)
// {
// node* n =new node(val);
// n->next = head;
// head = n;
// }
void insertAttail(node* &h... | ALGO | 0.999944 | 3.972778 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-09-06T04:23:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6ce3fa70f45c... |
408c3405-03b3-4d19-86b4-407a5561e9ce | fenghuo/coding | cpp/Replace_and_remove.cpp | // Copyright (c) 2013 Elements of Programming Interviews. All rights reserved.
#include <cassert>
#include <iostream>
#include <random>
#include <string>
using std::cout;
using std::default_random_engine;
using std::endl;
using std::random_device;
using std::string;
using std::uniform_int_distribution;
// @include
s... | ALGO | 0.998535 | 5.033319 | {
"github_metadata": {
"branch": "master",
"commit_count": 487,
"repo_created_at": "2014-10-03T21:01: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": "594f8572... |
9ed5ceaf-9c5b-428b-bf48-b7d7acdf8b31 | zkEloHub/LC-SourceCode | lc92_2.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution { // tail 100%
public:
ListNode* reverseBetween(ListNode* head, int m, int n) {
if(m == n || head == NULL || head->next == NULL) ret... | ALGO | 0.999995 | 5.499092 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2019-11-12T05:58: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": "502a58f3b... |
02d870f8-df47-4b56-9214-6a3fc418843a | akshita2703/TREE | Question/16_MinTimeToBurnTree.cpp | #include <bits/stdc++.h>
using namespace std;
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(left), right(... | ALGO | 0.99976 | 3.925177 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2023-12-23T07:22: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": "e8da94c0dec... |
eaaaee4d-9179-4f49-b3c1-dc054b499030 | qingping95/ACM | 题库/2016multi_6/1002_DP容斥.cpp | /*
* CF原题,不过当时没做出来2333,由于障碍数有限,很容易考虑反过来的情况,将通过障碍的路径全部减去,这里需要容斥
* 注意到n有100,但是由于人只能往下或者往右走,可以用dp[i][j]表示从起点走到第i个障碍经过j个障碍的方案数,利用这个
* dp即可
*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <cstring>
#include <string>
#include <cmath>
#include <set>
#include <map>
#include <vector>
#inc... | ALGO | 0.999883 | 3.822228 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2016-04-29T15:59:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d0b4e54e7... |
fb1d84e5-4899-4c70-86db-28927cefd922 | codekissyoung/CPP | Student_info.cpp | #include "Student_info.h"
#include <iostream>
#include <algorithm>
#include <stdexcept>
#include <vector>
#include <exception>
#include <list>
using namespace std;
double median( vector<double> vec )
{
auto size = vec.size();
if( vec.empty() )
throw domain_error( "median of an empty vector" );
s... | TOOL | 0.918745 | 4.359444 | {
"github_metadata": {
"branch": "master",
"commit_count": 201,
"repo_created_at": "2017-09-17T12:50:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f9a3d975... |
439d9a77-e1e7-4abe-82a7-bb5b688c5784 | ishandutta2007/codeforces-h | hir180/normal/1615/D.cpp | //Let's join Kaede Takagaki Fan Club !!
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cassert>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <fun... | ALGO | 0.999852 | 5.246615 | {
"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": "cf1bdfcc4cf1... |
7b7f558f-25f6-4654-9257-665a9589cbe7 | Y-ang/c_plus_plus | CodeCaprice/code/jianzhiII/007threeSum.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
vector<vector<int>> threeSum(vector<int>& nums) {
vector<vector<int>> res;
sort(nums.begin(), nums.end());
for (int i = 0; i < nums.size(); ++i) {
if (i > 0 && nums[i] == nums[i - 1]) continue; // 去重
... | ALGO | 0.999963 | 5.758133 | {
"github_metadata": {
"branch": "main",
"commit_count": 143,
"repo_created_at": "2022-01-17T02:03: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": "2d11ba96d6... |
48e5f492-c4ad-4758-94f8-b48aa15ec1d9 | sayantikag98/c-plus-plus-intro | c plus plus intro/rainwater_harvesting.cpp | #include<bits/stdc++.h>
using namespace std;
int func(int* arr, int n){
int ans = 0;
int templ [n];
int tempr [n];
for(int i = 0; i<n; i++){
tempr[i] = templ[i]= 0;
}
for(int i = 0; i<n-1; i++){
for(int j = i+1; j<n; j++){
if(arr[i]<arr[j]){
tempr[i]=... | ALGO | 0.999987 | 4.082164 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-01-26T14:39: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": "89aa1d1dbae3... |
9c8abba5-12bf-43a9-9040-92fbd7aacbc8 | Mojarras7/LeetCode-Solutions | LenghtOfLastWord/lenghtOfLastWord.cpp | #include <iostream>
using namespace std;
int lengthOfLastWord(string s) {
// int count = 0;
// int esp = 0;
// for(int i = 0; i <= s.size(); i++){
// if(s[i] == ' '){
// esp = i;
// }
// };
// for(int i = esp + 1; i< s.size(); i++){
... | ALGO | 0.994262 | 3.732771 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-09-18T16:56: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": "a5e85f38d71b... |
4078d362-aea1-45c9-a145-b44f9bea9d2b | sebas2426/Car-Racing- | main.cpp | #include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
#include <SFML/Audio.hpp>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <iostream>
#include <sstream> // para std::stringstream
using namespace sf;
using namespace std;
const int num = 8; // checkpo... | TOOL | 0.986104 | 5.280399 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-06-27T14:29: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": "72112f4bfd08... |
387ed24a-c245-490b-9bce-a7dc43c4fdfa | Loay-Ahmed/Graphics-Project | src/common.cpp | #include "../include/common.h"
#include <cmath>
#include <map>
int Common::Round(double x)
{
return (int)(x + 0.5);
}
COLORREF Common::interpolateColors(COLORREF c1, COLORREF c2, double t)
{
int r = Round(GetRValue(c1) * t + (1 - t) * GetRValue(c2));
int g = Round(GetGValue(c1) * t + (1 - t) * GetGValue(c... | TOOL | 0.996655 | 5.118074 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2025-05-19T07:53:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "29ded9a2d4f... |
ad3e5265-69b4-417e-84ea-17c8ecf6abc8 | yoheiotake/Algorithm | Algorithm/Lesson08/lesson8_1.cpp | #include<iostream>
#include<string>
#include<list>
#include<queue>
#include<map>
#include<algorithm>
using namespace std;
class Vertex;
class Adjacent {
Vertex* vertex;
double weight;
public:
Adjacent( Vertex* v, double w ) : vertex(v), weight(w) { };
Adjacent( ) : vertex(NULL), weight(0.0) { };
frie... | ALGO | 0.999828 | 4.615384 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2014-02-18T14:46: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": "da48438aa8... |
06809177-b897-4e1c-9748-8871a8cc6699 | ZhumabayDias/ADS | ADS4/1.CPP | #include <iostream>
#include <string>
using namespace std;
struct node {
int key;
node *ls = nullptr;
node *rs = nullptr;
string value = "";
node() {
key = 0;
}
node(int x) {
key = x;
}
node(int x, node *l, node *r) {
key = x;
ls = l;
rs = r;... | ALGO | 0.999997 | 4.491553 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-01-26T04:26: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": "c8b6f4b4a0d6... |
6969f0e9-5da9-429f-b6ef-c55b9539ff99 | xcloudyunx/Informatics | uva/12532.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
#define INF 1000000000
#define LSB(s) (s&(-s))
class SegmentTree {
private:
vi st;
int n;
int left(int p) { return p << 1; }
int right(int p) { return (p << 1)+1; }
int ... | ALGO | 0.999557 | 3.945092 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2021-09-11T05:16: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": "c49f310fc9f... |
098e99c2-483b-4e11-9105-882ddaa9bede | Macfly/HFTSimulator | Simulator.cpp | #include <fstream>
#include <iostream>
#include <sstream>
#include "Agent.h"
#include "Market.h"
#include "OrderBook.h"
#include "DistributionUniform.h"
#include "DistributionGaussian.h"
#include "DistributionExponential.h"
#include "LiquidityProvider.h"
#include "NoiseTrader.h"
#include "MarketMaker.h"
#include "Excep... | ALGO | 0.989429 | 4.284178 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2012-12-28T11:40:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 28,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dd521eaa... |
e2b27546-51f1-4a02-b7b3-565f78643e06 | monkeyKing001/Algorithm_exercise | hwichoi/09_bfs/1012/1012.cpp | #include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include <queue>
using namespace std;
int n, m, k, tc;
int board[52][52] = {};
bool vis[52][52] = {};
queue<pair<int, int>> Q;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main(int argc, char **argv)
{
ios::sync_with_stdio(0);
... | ALGO | 0.999767 | 4.041739 | {
"github_metadata": {
"branch": "main",
"commit_count": 302,
"repo_created_at": "2022-07-13T10:28:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8609e1b11... |
c6dc1758-9f39-45e6-be12-03afa5d23ff0 | xiang578/acm-icpc | hdu/hdu5691.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=1<<17;
const ll inf=1e18;
ll a[20],dp[N][20];
int n,t,f[20],b[20];
int get(int x)
{
int ret=0;
while(x>0)
{
if(x%2==1) ret++;
x/=2;
}
return ret;
}
int main()
{
int _;
scanf("%d",&_);
for(int... | ALGO | 0.999616 | 3.212482 | {
"github_metadata": {
"branch": "master",
"commit_count": 376,
"repo_created_at": "2015-07-27T14:04:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc53ad16... |
a4429eed-49a4-4d6f-96f1-c840a73ec06f | Krishnam2411/contests | AtCoder Beginner Contest 380/B_Hurdle_Parsing.cpp | // <NAME>
// 2212147
#include <bits/stdc++.h>
using namespace std;
#ifndef ONLINE_JUDGE
#include "debug.cpp"
#else
#define debug(...)
#define debugArr(...)
#endif
typedef long long int ll;
typedef unsigned long long ull;
typedef long double ld;
#define MOD 1000000007
#define _MOD 998244353
#define INF 100000000000... | ALGO | 0.999844 | 4.363947 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-06-24T20:36: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": "ecfeba0a3222... |
49850887-8473-4eea-a127-faba6aa72a6d | lfantine/matrix | ex08/main.cpp |
#include <iostream>
#include "../utils/Structs.hpp"
#include "../utils/Utils.hpp"
using vector_list = std::vector<Vector<f32>>;
using coef_list = std::vector<f32>;
int main() {
std::cout << color("Test de la 'Trace' : ", YELLOW + UNDERLINE) << std::endl;
Matrix<f32> a({{1.f, 0.f},\
{0... | ALGO | 0.921684 | 3.254761 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-01-10T18:38: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": "abb54c7ff1bd... |
e73d73cb-0321-4680-933f-8cd1b1239a91 | xchmwang/algorithm | uva/uva673/uva673/main.cpp | /*
3
([])
(([()])))
([()[]()])()
*/
#include <iostream>
#include <stack>
#include <string>
using namespace std;
bool match(char ch1, char ch2)
{
if (ch1=='(' && ch2==')') return true;
else if (ch1=='[' && ch2==']') return true;
return false;
}
int main()
{
stack<char> st;
int t; cin >> t;
while (t--)
{
strin... | ALGO | 0.999882 | 5.289166 | {
"github_metadata": {
"branch": "master",
"commit_count": 246,
"repo_created_at": "2015-09-21T05:22:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f5e1d656... |
117a313f-4d53-499d-bc50-ef605df8dbac | ClaraNs/DataStructures | pilha_dinamica/pilha_bem_formada.cpp | #include <iostream>
using namespace std;
class Node
{
public:
// Construtor
Node(char valor) : dado(valor), prox(nullptr) {}
// Métodos
char obterDado();
Node* obterProximo();
void setaProximo(Node *p);
private:
char dado;
Node *prox;
};
class... | ALGO | 0.999559 | 5.11531 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-09-02T15:50: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": "19c193f54cec... |
89c908d0-1a48-4d6d-93b2-693b0d6e7b56 | iknoom/Problem_Solving | Hacker Cup/2020/QR/C/C.cpp | #include <bits/stdc++.h>
using namespace std;
using pi = pair<long long, long long>;
long long solution() {
int N; cin >> N;
vector<pi> logs;
for(int i = 0; i < N; i++) {
long long p, h;
cin >> p >> h;
logs.emplace_back(p, h);
}
sort(logs.begin(), logs.end());
map<long... | ALGO | 0.999817 | 4.839723 | {
"github_metadata": {
"branch": "master",
"commit_count": 178,
"repo_created_at": "2020-07-04T17:17:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef005f3... |
ba0d21a7-21d2-48b7-8a6d-11da67838471 | ZRZRING/algorithm | Practice/Codeforces/Other Round/CodeTON Round 5/A.cpp | #include <bits/stdc++.h>
#define int64 long long
inline int64 read() {
bool sym = 0; int64 res = 0; char ch = getchar();
while (!isdigit(ch)) sym |= (ch == '-'), ch = getchar();
while (isdigit(ch)) res = (res << 3) + (res << 1) + (ch ^ 48), ch = getchar();
return sym ? -res : res;
}
int main() {
int T = read... | ALGO | 0.99982 | 3.499294 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-03-11T04:17: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": "e05fa91c86ad... |
9d57c8eb-43d1-49c4-895a-c0517971efd9 | DhruvKhandelwal21/DSA | 0673-number-of-longest-increasing-subsequence/0673-number-of-longest-increasing-subsequence.cpp | class Solution {
public:
int solve(vector<int> &nums,int n,int prev, int curr,vector<vector<int>> &dp){
if(curr>=n){
return 0;
}
if(dp[prev+1][curr]!=-1){
return dp[prev+1][curr];
}
int pick=0,nopick=0;
if(prev==-1||nums[curr]> nums[prev]){
... | ALGO | 0.999995 | 5.916441 | {
"github_metadata": {
"branch": "main",
"commit_count": 1294,
"repo_created_at": "2023-07-03T04:44:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d95409a68... |
9f8e2c90-68df-4f4e-9d43-897e708b4a9e | AhmedYAbbas/Problem-Solving | LeetCode/string-compression/Wrong Answer/7-12-2023, 1_38_01 PM/Solution.cpp | // https://leetcode.com/problems/string-compression
class Solution
{
public:
char IntToChar(int value)
{
std::string str = std::to_string(value);
return str[0];
}
int compress(vector<char>& chars)
{
int j = 0, count = 1;
if (chars.size() < 2)
return c... | ALGO | 0.999972 | 5.845591 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2023-07-26T11:04: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": "0e0a1f2eea7... |
1b640649-16a1-4c5f-9e13-0c3704284419 | JuzeB/CodePTitC | liietkensonguyentodautien.cpp | #include <stdio.h>
#include <math.h>
#include <stdbool.h>
int n;
int cnt = 0;
bool isPrime(int n) {
if (n == 2 || n == 3) return true;
if (n < 2 || n % 2 == 0 || n % 3 == 0) return false;
int k = -1;
do {
k += 6;
if (n % k == 0 || n % (k + 2) == 0) break;
} while (k <= trunc(sqrt(n)));
return (k > trunc(sq... | ALGO | 0.999832 | 4.106814 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-06-17T13:33: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": "60fcb9f21a8d... |
b6078ac4-5a2c-4151-9975-2b090bc28ebc | Baplisca/Competitive-Programming-Library | library/しゃくとり法2.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(v) (v).begin(), (v).end()
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<n;++i)
ll MOD = 1000000007;
const long long INF = 1LL << 60;
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}ret... | ALGO | 0.999946 | 4.157899 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2021-03-23T11:22:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8270f07657c5... |
b81a7957-4cde-43a3-a7fa-fe679a05b614 | zjwzjw369/path-tracing-CPP | pathTracing/pathTracing/main.cpp | #include "head.hpp"
Camera camera(Vector3(0.0, 5.0, 15.0), Vector3(0.0, 0.0, -1.0), Vector3(0.0, 1.0, 0.0), 90.0);
Scene scene;
const int width = 1024;
const int height = 1024;
Sphere sphere1(Vector3(-10.0, 10.0, -10.0), 10.0);
Sphere sphere2(Vector3(10.0, 10.0, -10.0), 10.0);
void renderDepth(Vector3 *pixels,double m... | ALGO | 0.995418 | 4.323453 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-04-06T16:56:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "99abff992e... |
e0dd7a7c-5cf2-4eb3-81e9-970801bec67b | QuentinGrnr/Arbres-Binaires-Equilibres | AVL.h | #include <string>
#include <iostream>
using namespace std ;
class noeud
{
friend class AVL ;
int cle ; // valeur du noeud
int N ; // nombre de noeuds de l'arbre enraciné par ce noeud
int d ; // déséquilibre de ce noeud
int h ; // hauteur de l'arbre enraciné par ce noeud
noeud * fg ; // fils gauche... | ALGO | 0.989163 | 3.873517 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-10-22T14:50:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3885901123db... |
75755951-8ef1-4076-ac3c-f72072ec894c | WhiteCatStudies/lectures | pt2/lectures/lecture7/examles/3_predefined_func_objs/main.cpp | #include <iostream>
#include <functional> // функторы STL
#include <vector>
#include <algorithm>
#include "../vector_out.hpp"
#include "person.hpp"
using namespace std::placeholders; // _1, _2 ...
void testTransform(std::vector<int>& vec)
{
std::cout << "Initial vector is:\n" << vec << std::endl;
// Изменение ... | TOOL | 0.956968 | 5.156758 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2021-09-03T13:50:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1e44ae4... |
82f4214a-385d-40e1-9287-a6b531c2a54c | nathansttt/hog2 | deprecated/coprobber/MinimaxAStar.cpp | #include "MinimaxAStar.h"
// MINIMAX A*
MinimaxAStarMulti::MinimaxAStarMulti( GraphEnvironment *_env, unsigned int _number_of_cops, bool _canPass ):
env(_env), number_of_cops(_number_of_cops), canPass(_canPass) {
crg = new CopRobberGame( env, number_of_cops, false, canPass );
}
MinimaxAStarMulti::~MinimaxAStarMu... | ALGO | 0.999839 | 4.236495 | {
"github_metadata": {
"branch": "PDB-refactor",
"commit_count": 2251,
"repo_created_at": "2015-08-19T21:02:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 117,
"forks": 62,
"issues": 9,
"pull_requests": 1
},
"file_meta": {
"content_id":... |
11df4305-d06d-46c1-a7e8-c5f026acb906 | Geant4/geant4 | source/processes/hadronic/models/im_r_matrix/src/G4MesonAbsorption.cc | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... | ALGO | 0.995224 | 4.450722 | {
"github_metadata": {
"branch": "master",
"commit_count": 83,
"repo_created_at": "2016-06-21T08:25:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 705,
"forks": 340,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "f33a24... |
22ac5bf6-25bd-4d6e-981c-0307c686de35 | Bynaryman/OSFNTC | flopoco/src/FixFunctions/Attic/PolynomialEvaluator.cpp | /*
A polynomial evaluator for FloPoCo
Author : <NAME>
This file is part of the FloPoCo project
developed by the Arenaire team at Ecole Normale Superieure de Lyon
Authors: <NAME>, <NAME>
Initial software.
Copyright © ENS-Lyon, INRIA, CNRS, UCBL,
2008-2010.
All rights reserved.
*/
//TODO choice o... | ALGO | 0.997966 | 4.491692 | {
"github_metadata": {
"branch": "main",
"commit_count": 340,
"repo_created_at": "2023-05-30T08:55:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7ced9e3e8c... |
59ac8bd6-214f-4bc4-bd03-6cde84ac4716 | ruska112x/cp | CF_r927_div3/c.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
void solve()
{
long long n, m;
cin >> n >> m;
long long a[n];
long long tmp;
for (size_t i = 0; i < n; i++)
{
cin >> tmp;
if (... | ALGO | 0.99992 | 3.637685 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-02-18T11:05:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "43b376be636... |
4d3a09d4-ae93-4fab-a1fc-49bacb9a1869 | ishandutta2007/codeforces-k | killerx/normal/575/G.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define rep(i, n) for (int i = 0; i < (int)(n); ++ i)
const int mxn = 1e5 + 5;
int n, m, S, T;
int dis[mxn], rdis[mxn], prv[mxn], prc[mxn];
vector <pair <int,... | ALGO | 0.999982 | 4.021207 | {
"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": "ba95f72b1b65... |
1e9d3318-5dbc-46ad-8d23-b5f99274db08 | NathanVss/Noxel-OpenGL | YuEngine/DDAHelper.cpp | #include "DDAHelper.h"
#include <math.h>
namespace YuEngine {
DDAHelper::DDAHelper(float sx, float sy, float ex, float ey){
this->sx = sx;
this->sy = sy;
this->ex = ex;
this->ey = ey;
float divizor = ex - sx;
if( divizor == 0) { divizor = 1; }
this->a = (ey - sy) / divizor;
this->b = ey - ex * a;
this->isF... | ALGO | 0.996815 | 4.759776 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2015-01-19T23:20: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": "0c7f48702... |
1a0fffc0-cd34-4c04-b1fe-f685da21a095 | ishandutta2007/codeforces-n | nuip/normal/965/D.cpp | #include <string>
#include <vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<functional>
#include<list>
#include<deque>
#include<bitset>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<cstring>... | ALGO | 0.999946 | 3.445251 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35: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": "1db94004fc8f... |
542b2f00-bd6f-4824-a7cd-8a2fd48036c3 | Vishwam36/Leetcode | Math/Count Ways to Build Rooms in an Ant Colony.cpp | // By <NAME>
// https://leetcode.com/problems/count-ways-to-build-rooms-in-an-ant-colony/
// Good question, Math, Graph
// REF : https://www.youtube.com/watch?v=MGKLPpR6NKI
/*
You are an ant tasked with adding n new rooms numbered 0 to n-1 to your colony. You are given the expansion plan as a 0-indexed integer array o... | ALGO | 0.999968 | 5.348887 | {
"github_metadata": {
"branch": "main",
"commit_count": 376,
"repo_created_at": "2021-02-08T12:34: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": "bde407008f... |
fadd5e86-2108-4b0d-a5a8-a13ffd00a03f | Sridharan237/Data-Structures-and-Algorithms | 17.Hashing Technique/Quadratic Probing/quadraticprobing.cpp | // cpp program to implement Collision Resolving technique - "Quadratic Probing" - Here, Probe moves quadratically (i*i)
#include<iostream>
using namespace std;
// class for HashTable
class HashTable
{
public:
int *HT;
int size;
HashTable(int size);
~HashTable();
int hashFunction(int key);
i... | ALGO | 0.999946 | 4.22705 | {
"github_metadata": {
"branch": "master",
"commit_count": 120,
"repo_created_at": "2023-12-12T10:33: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": "5df041f5... |
6c032725-a397-4775-a6df-7ac8bf53b524 | bee-p/Data_structure | source_10.cpp | /*
#include <iostream>
using namespace std;
// (스택활용)중위 표기를 후위 표기로 변환
// 괄호가 잘 되어있다고 가정
#define element char // element는 char형
const int MAX_SIZE = 1000; // #define MAX_SIZE 1000
class Stack {
public:
char mystack[MAX_SIZE];
int top;
Stack() { top = -1; }
bool is_stack_empty() {
// if (top == -1) return tru... | ALGO | 0.999837 | 3.86072 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2021-08-09T14:03: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": "caf9e7fb312... |
18e1b95d-9917-49a4-930f-34b52b3e8f31 | plenilune3/problem_solving_cpp | 모의 SW 역량테스트/2105_디저트 카페.cpp | #include <iostream>
using namespace std;
const int MAX = 20;
const int dx[] = { 1, 1, -1, -1 };
const int dy[] = { 1, -1, -1, 1 };
int cafe[MAX][MAX];
bool desert[101];
int N, answer;
void backtracking(int x, int y, int d, int cnt, int sx, int sy)
{
if (d == 4)
return;
if (x == sx && y == sy &&... | ALGO | 0.999772 | 5.269643 | {
"github_metadata": {
"branch": "master",
"commit_count": 710,
"repo_created_at": "2020-04-06T05:39: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": "ba04ab0d... |
35f931ee-2e20-4e2a-aafe-aa9afee816e9 | anas3a/Online-Judge-Solutions | C_Dominant_Piranha.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector <int>;
using vll = vector <ll>;
using vvi = vector <vi >;
using pii = pair <int, int>;
using pll = pair <long, long>;
using vpi = vector <pii >;
#define pb push_back
#define mp make_pair
#define all(v) (v).begin(), (v).end()
#defin... | ALGO | 0.999856 | 3.961536 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-01-12T12:08: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": "b596c9326c5a... |
6356f57b-2bd5-4e66-acd6-b7a9cadf3b75 | renzov/Red_Crown | Kattis/RM22/everythingisanail.cpp | #include<cstdio>
#include<climits>
#include<algorithm>
using namespace std;
const int MAXN = 300005;
int N;
int T[MAXN];
int ord[3] = {0, 1, 2};
int dp[3][MAXN];
int solve(){
dp[2][N - 1] = T[N - 1] == ord[2]? 1:0;
dp[1][N - 1] = max( dp[2][N - 1], T[N - 1] == ord[1]? 1:0 );
dp[0][N - 1] = max( dp[1][N - 1], T[N ... | ALGO | 0.999968 | 3.830789 | {
"github_metadata": {
"branch": "master",
"commit_count": 166,
"repo_created_at": "2012-06-03T15:15:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d82752b9... |
5bedde35-1c8b-4bb0-ac3e-78692fb53702 | Baileylin/raytracer | src/sphere.h | // ray.h, from https://raytracing.github.io by <NAME>, 2018-2020
#ifndef SPHERE_H
#define SPHERE_H
#include "hittable.h"
#include "AGLM.h"
#include <cmath>
class sphere : public hittable {
public:
sphere() : radius(0), center(0), mat_ptr(0) {}
sphere(const glm::point3& cen, float r, std::shared_ptr<material> m)... | ALGO | 0.959651 | 6.12212 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-05-20T21:02:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7e125a03f77d... |
07514163-dc09-45ed-9de9-8ea89869205d | SwordHarry/LeetCode | 数据结构/栈和队列/栈/中缀表达式转后缀表达式并求值.cpp | #include <string>
#include <stack>
#include <iostream>
using namespace std;
class Solution{
public:
int postfix(string infix) {
int result = 0;
string resultStr = "";
int len = infix.length();
stack<int> numStack;
stack<char> operStack;
operStack.push('#');
... | ALGO | 0.999753 | 4.410613 | {
"github_metadata": {
"branch": "master",
"commit_count": 123,
"repo_created_at": "2019-01-20T12:51:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd28300f... |
40577df0-481f-4088-ba67-c9b1e0ae05b9 | Suhas-Borkar/c- | swap_call_by_pointer.cpp | #include <iostream>
using namespace std;
void swapPointer(int *a,int *b) // call by pointer address
{
int t=*a;
*a=*b;
*b=t;
}
void swapPointer2ndmethod(int &x,int &y, int &a,int &b) // ya thikani swap kel ahe pan referance variable use karun
{
int t=x;
x=a;
a=t;
t=y;
y=b;
b=... | ALGO | 0.998446 | 5.142294 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2023-01-28T12:57:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "258313688... |
0a64b0fe-1ab1-441e-b60a-f726042b3a95 | CheemsaDoge/Test | 0000.00.00更早以前/7.20/sP4878 [USACO05DEC] Layout G.cpp | //Author:pawn
#include<bits/stdc++.h>
using namespace std;
int n,ml,md,a,b,c,fst[10100],nex[50010],v[50010],w[50010],cnt,vis[10100],dis[10100],tim[10100];
queue<int> q;
void add(int a,int b,int c)
{
nex[++cnt]=fst[a];
fst[a]=cnt;
v[cnt]=b;
w[cnt]=c;
return ;
}
int spfa(int k)
{
memset(dis,0x7f/3... | ALGO | 0.999719 | 3.407784 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2022-10-16T08:42:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2de98bcf770... |
38b10e85-3500-4039-ba8e-1eac277d8c63 | ngophuc/CurveDecomposition | ImaGene/src/helper/LinearMinimizer.cxx | ///////////////////////////////////////////////////////////////////////////////
// //
// File name : LinearMinimizer.cxx
//
// Creation : 2004/11/24
//
// Version : 2004/11/24
//
// Author : <NAME>
//
// email : <EMAIL>
//
// Purpose : ??
//
// D... | ALGO | 0.99942 | 5.906621 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2016-10-05T12:03:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "7448b1d17... |
e3d5d6ed-793e-4b03-bebc-e84e3465a0c8 | BernyFranklin/Csci115FinalProject | OrderSorting.cpp | #include "OrderSorting.h"
#include <cstdlib> // for rand
#include <ctime> // for seeding rand
#include <sstream> // for generating orderId in hex
#include <iomanip> // for formatting
#include <iostream> // for output
#include <chrono> // for tracking time
#include <fstream> // for a... | ALGO | 0.999826 | 6.239145 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2024-12-05T21:32: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": "b8dad339a92... |
765cbd86-1c06-449f-b6a8-b4985d281ec7 | Falcogiovanni01/Algoritmi-e-strutture-dati | Programmazione_Dinamica/MinimumSumPath(D10)/main.cpp | #include <iostream>
#include <vector>
#include <climits> // Per INT_MAX
using namespace std;
/**
* TRACCIA :
* data una matrice N*M,
* traccia la somma minima, sapendo che puoi andare
* - se parti da 00 a destra e sotto
* - se parti da n-1M-1 sopra e a sinistra
* es :
* 5 9 6
* 11 5 2
* la somma minima è... | ALGO | 0.999993 | 6.40086 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2024-10-11T10:55: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": "8dfd6d290da... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.