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 |
|---|---|---|---|---|---|---|---|
90a3b58b-11a0-4995-95dc-e24c438f03c4 | onnhyd/all_codes_with_bug | LC_3045.cpp | //https://leetcode.com/problems/count-prefix-and-suffix-pairs-ii/description/
struct TrieNode {
struct TrieNode *children[26];
set<int>inds;
// isLeaf is true if the node represents
// end of a word
// bool isLeaf;
};
class Solution {
public:
#define ll long long
void deleteTrie(TrieN... | ALGO | 0.999907 | 5.790536 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2022-07-07T06:23:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 7,
"issues": 8,
"pull_requests": 1
},
"file_meta": {
"content_id": "e44d2cad78f... |
78a17f54-519a-48e2-9d1b-219821ebdeee | margarita-markova/No-Comments | no_comments.cpp | #include <iostream>
#include <fstream>
#include <queue>
#include <boost/algorithm/string/find.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/trim.hpp>
bool HandleComment(std::string &buffer) {
//we need to check which part of sentence is comment
std::queue<size_t> pos_co... | TOOL | 0.944707 | 3.434223 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-04-22T10:26: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": "3933907f78... |
5fa34a2d-9ceb-4d04-b31f-7931340f7319 | VEK239/algo-labs | term2/lab4_algo/lab4_J/main.cpp | #include <iostream>
#include <cmath>
struct node
{
bool set = false;
int leftBound;
int rightBound;
long long value = 0;
int valNum;
};
node tree[2500000];
long n, arrLen;
long long min(long long a, long long b)
{
return a < b ? a : b;
}
node max;
int arrLength(int n)
{
int y = 1;
while ... | ALGO | 0.99996 | 4.329535 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-12-02T09:18: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": "6921ca429d... |
ed4a5f27-9ee1-4506-b99d-580e64c4c608 | mazen-alasas/Problem-Solving | LeetCode/Practice Sheet/Arrays & Hashing/217. Contains Duplicate.cpp | // O(n^2) --> Time Limit Exceeded
class Solution {
public:
bool containsDuplicate(vector<int>& nums) {
int ctr = 0;
for(int i = 0; i < nums.size(); i++){
int now = nums[i];
for(int j = 0; j < nums.size(); j++){
if(i == j)
continue;
... | ALGO | 0.999968 | 5.313003 | {
"github_metadata": {
"branch": "main",
"commit_count": 103,
"repo_created_at": "2023-09-01T14:59: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": "353305e1ac... |
60ea3435-7af1-4eab-bad6-a01aea6348aa | SunshineTeen/SJ-programming-backup | 大一上/homework-16/homework-16/6-13.cpp | /* 班级:计算机一班 学号:1652228 姓名:王哲源 */
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cstring>
#define For(i,l,r,k) for(double i=l;i<=r;i+=k)
using namespace std;
const int n = 10000000;
const double eps = 1e-12;
double fun_sin(const double l,const double ... | ALGO | 0.999687 | 3.870138 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-06-23T15:33: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": "58e4ba344e... |
0d660ade-cadf-48d1-9436-cae212d622d5 | laviolet/BALM | balmingles/movimentos.ino | #define speed 200
#define ajusteA 15
#define ajusteB 8
#define ajusteC 5
#define ajusteD 1
//Parar
void stop(){
digitalWrite(FontRightWheel_Foward, LOW); // turn the LED off by making the voltage LOW
digitalWrite(FrontRightWheel_Backwards, LOW); // turn the LED off by making the voltage LOW
digitalWrite(Fron... | TOOL | 0.996149 | 4.41416 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-05-25T02:21: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": "cc66ed3cb401... |
4deeac36-7aa5-41d6-b618-16517653f79b | 70825/BOJ | 1900/1932.cpp | #include <iostream>
using namespace std;
typedef long long ll;
const int N = 501;
const int M = 1001;
int main()
{
int n;
cin >> n;
ll arr[N][N] = { 0, };
ll dp[N][N] = { 0, };
for (int i = 0; i < n; i++) {
for (int j = 0; j <= i; j++) cin >> arr[i][j];
}
dp[0][0] = arr[0][0];
for (int i = 1; i < n; i++) ... | ALGO | 0.999984 | 3.568432 | {
"github_metadata": {
"branch": "master",
"commit_count": 255,
"repo_created_at": "2021-02-14T13:13:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4732a83c... |
92f1aa9c-604c-4b3c-bec4-480315251186 | hareta0109/atcoder | submissions/past/past201912-open/e.cpp | #include <bits/stdc++.h>
using namespace std;
#define MOD (long long int)(1e9+7)
#define ll long long int
#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 REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define FOR(i,a,b) for(int i=a; i<... | ALGO | 0.999889 | 3.976394 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2022-08-24T11:29: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": "8ac8feffa26... |
291af788-f6c8-4afa-81b2-8660afc0752b | charles-malherbe/SIR | methods/treatment.cpp | #include <iostream>
using namespace std;
int main()
{
double H = 500000;
double Z = 1;
double M = 0;
double I = 0;
double H1, Z1, M1, I1;
double cHI = 0.0095; // coeff Humain -> Infecté
double cIZ = 0.005; // coeff Infecté -> Zombie
double cHM = 0.0001; // coeff Humain -> Mor... | ALGO | 0.997437 | 3.094743 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2022-12-23T10:26:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "4e363f9d5a8... |
bc80ada6-81f6-44be-9528-ee2b86331c9c | rdeboer1/AZURE2 | coul/include/ode_int.H | #ifndef ODE_INT_H
#define ODE_INT_H
#include "complex_functions.H"
// Direct integration of the Coulomb equation
// ------------------------------------------
// One uses the Burlisch-Stoer-Henrici method, where one integrates on different meshes
// with the Henrici method, and then uses the Richardson method to get ... | ALGO | 0.998598 | 5.60212 | {
"github_metadata": {
"branch": "qt5",
"commit_count": 20,
"repo_created_at": "2020-07-03T15:41:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0fba9b8ec87e... |
f73c8258-7951-4f35-ab72-ccf038876202 | dominhquan12/Cpp | bai143.cpp | #include<bits/stdc++.h>
using namespace std;
void nhap(char a[100][100],int n){
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
cin>>a[i][j];
}
}
}
int findSubSquare(char mat[100][100],int N) {
int max = 0; // Initialize result
// Initialize the left-top value in hor[][] and ver[][]
int hor[N][... | ALGO | 0.999958 | 4.453394 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-08-30T08:12: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": "c839217a57... |
fb300f85-acda-4111-b81f-ca84cb133396 | ifsmirnov/olymp | camps/ptz_winter14/day4/j/j.cpp | #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <functional>
#include <numeric>
#include <set>
#include <map>
#include <cassert>
#include <ctime>
#include <cstdlib>
using namespace std;
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define fore... | ALGO | 0.999959 | 3.43201 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2014-11-06T00:13: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": "fefa23bec... |
9b7ce23c-23e8-4610-a89f-e13ba33982c3 | SerendipityFanan/Algorithm-Analysis-and-Design | Dijkstra算法/Dijkstra.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <climits>
using namespace std;
struct Edge {
int to;
int weight;
Edge(int t, int w) : to(t), weight(w) {}
};
void Dijkstra(vector<vector<Edge>>& graph, int start, vector<int>& distance, vector<vector<int>>& path) {
int n = graph.size();
... | ALGO | 0.99996 | 4.466677 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2025-03-03T13:44: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": "df7c65b9ff... |
510a6887-9d98-44da-89c6-d063e1fbad68 | awatarn/General_Projects | 99_MKL_Examples/vslc/source/generatedata.inc | /*******************************************************************************
* Copyright 2003-2017 Intel Corporation All Rights Reserved.
*
* The source code, information and material ("Material") contained herein is
* owned by Intel Corporation or its suppliers or licensors, and title to such
* Material rem... | TOOL | 0.97764 | 4.387309 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2020-11-07T06: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": "8f0d990580a... |
4e95f547-9d26-4132-8968-f68652c729d0 | paliwalsafal/Competitive_Programming | cses/Dynamic Programming/Book_Shop.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define all(x) (x).begin(),(x).end()
#define tr(x, i) for(typeof (x).begin() i = x.begin(); i != x.end(); i++)
#define sz(x... | ALGO | 0.999997 | 4.584898 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2021-07-05T15:23: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": "16d2ac1663... |
e3e49488-87a6-474f-9d8b-c1054ef40e4b | HaewonShon/PS-Record | 백준/Silver/1326. 폴짝폴짝/폴짝폴짝.cc | #include <bits/stdc++.h>
using namespace std;
int visited[10001];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
memset(visited, 0, sizeof(visited));
int n;
cin>>n;
vector<int> spot(n+1);
for(int i = 1; i <= n; ++i) cin>>spot[i];
int a, b;
cin>>a>>b;
queue<... | ALGO | 0.999987 | 3.612071 | {
"github_metadata": {
"branch": "main",
"commit_count": 322,
"repo_created_at": "2024-06-14T17:36: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": "4ce1cf2292... |
5e982136-504f-4105-8c33-d96a9dce3351 | walkccc/LeetCode | solutions/494. Target Sum/494.cpp | class Solution {
public:
int findTargetSumWays(vector<int>& nums, int target) {
const int sum = accumulate(nums.begin(), nums.end(), 0);
if (sum < abs(target) || (sum + target) % 2 == 1)
return 0;
return knapsack(nums, (sum + target) / 2);
}
private:
int knapsack(const vector<int>& nums, int ... | ALGO | 0.999994 | 6.016755 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2019-02-23T15:46:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1254,
"forks": 437,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6258068... |
04198be3-88b4-4056-932f-05156215a828 | junes7/python_algorithm | 백준/Silver/24393. 조커 찾기/조커 찾기.cc | #include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int main(void) {
int n, elem, next, left_sum, right_sum, joker = 1;
string st;
vector<int> A;
ios_base::sync_with_stdio(false);
cin.tie(NULL);
getline(cin, st);
n = stoi(st);
for (int i = 0; i < n; i++) {
... | ALGO | 0.999855 | 3.582996 | {
"github_metadata": {
"branch": "master",
"commit_count": 5511,
"repo_created_at": "2021-01-25T13:46: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": "44835b5... |
4aa2fd5c-b92f-4585-a329-2b83a6cf3f5a | ys1113457623/Programming-Paradigms | check_if_two_string_array_are_equivalent.cpp | /*
1662. Check If Two String Arrays are Equivalent
Easy
1041
121
Add to List
Share
Given two string arrays word1 and word2, return true if the two arrays represent the same string, and false otherwise.
A string is represented by an array if the array elements concatenated in order forms the string.
Example 1:
... | ALGO | 0.999763 | 6.338721 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2022-10-04T17:11:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9c7bfb016e4... |
da4e29c1-e62e-4291-8f92-c62b4b5c817a | cmeslo/leetcode | solution/445. Add Two Numbers II/445_01.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
stack<int> s1, s2;
while (l1) {
s1.push(l1->val);
... | ALGO | 0.999994 | 6.262364 | {
"github_metadata": {
"branch": "master",
"commit_count": 3508,
"repo_created_at": "2017-07-08T14:09: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": "8c9544a... |
02cd097f-f680-4d6c-85df-7305a01458db | OutisNoMore/coding_practice | c++/ListGraph/dep/ListGraph/ListGraph.hpp | #ifndef LISTGRAPH_H
#define LISTGRAPH_H
#include <string>
#include "LinkedList/LinkedList.hpp"
#include "PriorityQueue/PriorityQueue.hpp"
template <typename E>
struct pair{
E destination;
double weight;
pair(){
}
pair(E destination, double weight){
this->destination = destination;
this->weight =... | ALGO | 0.976058 | 5.770954 | {
"github_metadata": {
"branch": "main",
"commit_count": 98,
"repo_created_at": "2021-01-04T17:53:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d2860799eb6... |
9c8dae52-38db-4b3d-8d23-1a561f08e039 | grishasobol/Steiner-tree-generator | STGenerator/Primitives.h | #pragma once
#include <vector>
#include <set>
#include <cmath>
#include <algorithm>
#include <tuple>
#include <memory>
#include <cassert>
#include <ostream>
#include <iostream>
#include <numeric>
#include <string>
using namespace std;
class Point {
public:
int x;
int y;
bool isSteiner = true;
string layer = "... | ALGO | 0.992731 | 3.173422 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-12-12T21:43: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": "a4aa554a95... |
6c6801d1-0add-4fe4-9d87-5536982f6dce | Kyle549/MEng_Project | UserStoryElicitation/Code_Snippets/71-80/s421145314.cpp | #include<iostream>
#include<string>
#include<sstream>
#include<cmath>
using namespace std;
double fpx(double a, double b, double c, double d, double e, double f);
double fpy(double a, double b, double c, double d, double e, double f);
double fr(double a, double b, double c, double d);
string toStr(double a);
string i... | ALGO | 0.999667 | 4.678995 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-05-22T06:40:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7339ccd6471... |
36e92647-f551-4f11-ad9e-827f01f86391 | fishy15/competitive_programming | online/cses/dp/inc_subseq.cpp | #include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <array>
#include <algorithm>
#include <utility>
#include <map>
#include <queue>
#include <set>
#include <cmath>
#define ll long long
#define eps 1e-8
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define INFLL 0x3f3f3f3f3f3f3f3f
// ... | ALGO | 0.999791 | 4.181515 | {
"github_metadata": {
"branch": "master",
"commit_count": 1058,
"repo_created_at": "2019-02-21T11:46:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 30,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9639c... |
03184c5c-1339-491d-8e25-2ebe4e6748a8 | ghdcksgml1/study | 4주차/한현민/06_1016_제곱_ㄴㄴ_수.cpp | #include <iostream>
int findSquare(int64_t min, int64_t max) {
int amount = 0;
int isSquare;
for (int i = min; i <= max; i++) {
isSquare = 0;
// 제곱수가 2 이상이므로 1부터 3까지는 항상 제곱 ㄴㄴ수가 됨
if (i >= 1 && i <= 3) {
amount++;
continue;
}
// 4부터
... | ALGO | 0.99973 | 5.164476 | {
"github_metadata": {
"branch": "main",
"commit_count": 229,
"repo_created_at": "2022-03-14T03:13:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cb82fcb163... |
c8e8907f-129b-4f3a-b19a-10bab09d563f | rechie901/segmentation-tracker | nodes/tracker.cpp | #include "ros/ros.h"
//#include "std_msgs/String.h"
#include <visualization_msgs/Marker.h>
#include "~/catkin_ws/src/lidar_tracker/include/centroids.h"
#include <iostream>
#include <Eigen/Dense>
#include <math.h>
#include <algorithm>
using namespace std;
using namespace Eigen;
//lidar_tracker::centroids track;
lidar_t... | ALGO | 0.989074 | 4.045197 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-06-25T12:39: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": "5616ae022e... |
ee00dece-48ad-447c-8280-8103945efce9 | openPupil/Open-PupilEXT | 3rdparty/spii/thirdparty/FADBAD++/examples/MonteCarlo.cpp |
// Monte Carlo simulations to find the Price and Greeks of a simple
// Vanilla Call Option.
#include <cstdlib>
#include <cmath>
#include "badiff.h"
#include "fadiff.h"
#include <iostream>
using namespace std;
using namespace fadbad;
double GetOneGaussianBySummation()
{
double result=0;
for (unsigned long j=0; j ... | ALGO | 0.99963 | 5.956442 | {
"github_metadata": {
"branch": "main",
"commit_count": 126,
"repo_created_at": "2020-11-11T14:44:41.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 126,
"forks": 30,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "9a885f89... |
a48a7697-a9cd-4427-af69-baf2b58ac2ea | Yawn-Sean/Daily_CF_Problems | daily_problems/2025/02/0226/personal_submission/cf1320b_hum.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n, m;
cin >> n >> m;
vector<vector<int>> g1(n), g2(n);
for (int i = 0; i < m; i++) {
int u, v;
cin >> u >> v;
--u, --v;
g1[u].push_back(v);
g2[v].push_back(u);
}
int t... | ALGO | 0.999753 | 4.114197 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "85bb... |
6b8dc69e-2699-4957-8a87-120af7be8a47 | prashant-th18/Coding-Begins | CF-813/B.cpp | #ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include "bits/stdc++.h"
using namespace std;
const int MOD = 1000000007;
typedef long long ll;
typedef long double ld;
#define sz(s) ((int)s.size())
#define all(v) begin(v), end(v)
#define ff first
#define ss second
mt19937 rnd(chrono::steady_clock::now().time_since_epoc... | ALGO | 0.999968 | 4.622131 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2021-11-20T20:28:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b63f6c9c... |
93d41ce0-82fa-4587-9933-6f0054fe80f9 | sweeneychris/TheiaSfM | src/theia/math/matrix/spectra_linear_operator.h | // Copyright (C) 2015 The Regents of the University of California (Regents).
// 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... | ALGO | 0.941561 | 7.202571 | {
"github_metadata": {
"branch": "master",
"commit_count": 958,
"repo_created_at": "2015-02-11T18:15:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 933,
"forks": 280,
"issues": 36,
"pull_requests": 10
},
"file_meta": {
"content_id": "a1... |
0e10a226-a00b-4d63-85ad-31961b9e4ac8 | langningchen/Coding | Etiger/0647.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 35;
int n, m, OK = 0, cnt[N];
bool in[N];
long double d[N], r;
vector<int> to[N];
vector<long double> w[N];
map<string, int> id;
int spfa()
{
queue<int> q;
for (int i = 0; i < n; i++)
{
q.push(i);
d[i] = in[i] = cnt[i] = 1;
}
while (!q.empty())
{
i... | ALGO | 0.999923 | 3.87758 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-05-25T03:10:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "09c9bc828c35... |
c1020a0d-76af-4720-9185-a91d3977a982 | cheeyeo/dirac | libdirac_common/wavelet_utils_mmx.cpp | /* ***** BEGIN LICENSE BLOCK *****
*
* $Id: wavelet_utils_mmx.cpp,v 1.13 2008/08/14 00:51:08 asuraparaju Exp $ $Name: Dirac_1_0_2 $
*
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in compliance... | ALGO | 0.999293 | 5.270217 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2012-01-30T22:32:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af644a76f4... |
c623190f-fef4-4076-a2e6-3d0208c571de | AlvesTSA/Exercicios_C-- | Estrutura_de_Rpetição/exercicio_027.cpp | /*27. Faça um programa que calcule o número médio de alunos por turma. Para isto, peça a quantidade de turmas e a quantidade de alunos para cada turma. As turmas não podem ter mais de 40 alunos.*/
#include <iostream>
using namespace std;
int main(){
int turmas = 0;
int alunos = 0;
int i = 0;
int som... | ALGO | 0.993865 | 4.099991 | {
"github_metadata": {
"branch": "main",
"commit_count": 191,
"repo_created_at": "2023-04-07T12:32: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": "aa9a789aa7... |
44dd47ac-7455-4903-83f6-a54ad92278ea | tawsif76/Contests | edu_152/B.cpp | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
bool cmp(pair<int, int> &p1, pair<int, int> &p2) {
if (p1.first != p2.first) return p1.first > p2.first;
return p1.second <= p2.second;
}
void solve() {
int n, k; cin >> n >> k;
int ara[n + 1], mn = INT_MAX;
for (int i = 1; i <= n; ++i) cin >> ... | ALGO | 0.999963 | 3.705757 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-01-08T13:49:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce0096f12533... |
bc074aa9-4541-4db5-8fb3-0f12c8e49005 | Cotidie/STEADY | knowledge/algorithm/BOJ/1655/가운데를 말해요.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
const int INTMIN = -10001;
const int INTMAX = 10001;
class Ascending {
public:
bool operator()(const int a, const int b) {
return a > b;
}
};
class Descending {
public:
bool operator()(const int a, const int b) {
... | ALGO | 0.99999 | 5.374201 | {
"github_metadata": {
"branch": "main",
"commit_count": 298,
"repo_created_at": "2021-09-24T11:53:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7aa74ed852... |
d65084ff-480e-454b-9219-26713f0bc21b | dreamsxin/example | algorithm/算法的乐趣代码/code23/fir/GameState.cpp | #include "StdAfx.h"
#include "GameState.h"
#include "ZobristHash.h"
//位置权值表
int posValue[BOARD_CELLS] =
{
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,1,1,1,1,1,1,1,0,
0,0,1,2,2,2,2,2,1,0,
0,0,1,2,3,3,3,2,1,0,
0,0,1,2,3,4,3,2,1,0,
0,0,1,2,3,3,3,2,1,0,
0,0,1,2,2,2,2,2,1,0,
0,0,1,1,... | ALGO | 0.993592 | 3.537125 | {
"github_metadata": {
"branch": "master",
"commit_count": 2757,
"repo_created_at": "2014-12-02T09:30:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 184,
"forks": 51,
"issues": 1,
"pull_requests": 5
},
"file_meta": {
"content_id": "8f71... |
710b0336-7aad-4205-a3de-af0f29e73d66 | Fritzam/Studia | CwiczeniaPPRG1Semestr/Zjazd08-09.10.22r.PD/Zadanie 1.2/Zadanie_1.2.cpp | //POLECENIE: Napisz program, który sprawdzi, czy liczba całkowita jest dodatnia, ujemna czy może jest 0. (1 pkt)
#include <iostream>
using namespace std;
int main() {
//Pobranie liczby od użytkownika.
int liczba;
cout << "Proszę podać liczbę: " << endl;
cin >> liczba;
//Sprawdzenie czy liczba j... | ALGO | 0.993705 | 4.013062 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2022-10-08T10:19: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": "38a499a5acf... |
225f7116-f437-4d3a-b72a-b308ddaf67cf | overIsAC/contest | atc/abc/abc331/a.cpp | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PII = pair<int, int>;
#define lson (k << 1)
#define rson (k << 1 | 1)
#if LEMON
#define db(x) \
cout << "function " << __FUNCTION__ << ", line " << __LINE__ << " : " \
<< #... | ALGO | 0.999428 | 4.167186 | {
"github_metadata": {
"branch": "main",
"commit_count": 131,
"repo_created_at": "2022-10-30T18:24: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": "9fe73396f5... |
a7faafab-aaf8-4b9f-992a-4f03ae12f551 | SamCullinan/Data-Structures-and-Algorithms | Data Structures/week1_basic_data_structures/5_max_sliding_window/max_sliding_window.cpp | #include <iostream>
#include <vector>
#include <deque>
using namespace std;
using std::cin;
using std::cout;
using std::deque;
using std::max;
void maxSlidingWindow(vector<int>& nums, int k) {
vector<int>res;
deque<int>dq;
for (int i = 0; i < nums.size(); i++) {
while... | ALGO | 0.999889 | 3.904816 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2020-04-12T11:55: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": "75f5d6738... |
3f003274-1cb6-47f8-ac2f-16b8ec8b93b5 | hipsty1/CPP | shortArray.cpp | #include <iostream>
#include <array>
#include <algorithm>
const size_t arraySize = 10;
void printArray(std::array <int, arraySize> &angka){
std::cout << "Array: ";
for(int&a : angka){
std::cout << a << " ";
}
}
void printArray(std::array <char, arraySize> &huruf){
std::cout << "Array: ";
... | ALGO | 0.996744 | 4.948493 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2025-01-25T12:08: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": "10a9ac756e9... |
1f78b2c4-0064-464e-a6d0-b79759db3c4e | mizanonik/DataStructure | Set3&4/problem_30.cpp | #include<iostream>
using namespace std;
#define MAX 500
int multiply(int x, int res[], int res_size)
{
int carry = 0;
for (int i=0; i<res_size; i++)
{
int prod = res[i] * x + carry;
res[i] = prod % 10;
carry = prod/10;
}
while (carry)
{
res[res_size] = carry%... | ALGO | 0.999855 | 5.260536 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-03-24T13:15: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": "7cb3366d08... |
4b110a60-261e-4fab-8fb4-e74cbe66ff3d | alexandraback/datacollection | solutions_2449486_0/C++/hpc/B.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#define MAXN 105
using namespace std;
int N,M;
int map[MAXN][MAXN],a[MAXN][MAXN];
bool process()
{
int h=0,MAXH,aH;
for(int i=0;i<N;++i)
for(int j=0;j<M;++j)
h=max(h,map[i][j]);
for(int i=0;i<N;++i)
for(int j=0;j<M;++j)
... | ALGO | 0.99994 | 3.456698 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c12307f4... |
bf23f2ca-bfd1-4908-a4b9-b6c9eb483914 | WilliamLewww/rsa_assignment | src/rsa_cpu.cpp | #include <stdio.h>
#include <math.h>
int gcd(int a, int b) {
int remainder = a % b;
if (remainder == 0) {
return b;
}
else {
return gcd(b, remainder);
}
}
int inverseMod(int e, int n) {
e = e % n;
for (int x = 1; x < n; x++) {
if ((e * x) % n == 1) {
return x;
}
}
}
double g... | ALGO | 0.999984 | 5.01969 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-12-02T04:04: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": "be81047244... |
5b310a56-1bbd-43e9-85a6-13970c1d62de | chemplife/Simulated-Annealing | neighbor function.cpp | #include <iostream>
#include<cstdlib>
#include<ctime>
using namespace std;
int main(){
//The array that will come to this function as an input. This is dummy data right now.
int a[] = {1,2,3,4,5,6,7,8,9,10};
int b=0;
int random1=0;
int random2=0;
int temp;
int *fora, *forA, *forB;
b=sizeof(a)/sizeof(*a);
//Si... | ALGO | 0.99982 | 4.325436 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2015-11-17T07:41:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "392a3f514a... |
2ce19463-cb05-4ebe-95b9-8996258714e2 | miaowh/ICPC | Codeforces/contest/715/d.cpp | #include <bits/stdc++.h>
using namespace std;
int n;
string bs[3];
bool work(int a, int b, char c) {
string s;
int N = 2 * n;
int i = 0, j = 0;
while (i < N && j < N) {
while (i < N && bs[a][i] != c) s.push_back(bs[a][i++]);
while (j < N && bs[b][j] != c) s.push_back(bs[b][j++]);
... | ALGO | 0.999804 | 4.393024 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2021-06-02T06:06: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": "b5842bb5285... |
2b939f3c-c8cf-4af0-9f24-dfc49e315997 | kritirikhi/DataStructuresAndAlgorithms | Ganesha'sPattern.cpp | #include <iostream>
using namespace std;
int main() {
int a[100]={0};
a[0]=0;
int num=5;
for(int i=1;i<100;i++){
a[i]=num;
num=num+2;
}
int n;
cin>>n;
int index;
for(int i=0;i<100;i++){
if(a[i]==n){
index=i;
break;
}
}
/... | ALGO | 0.999994 | 3.324805 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-01-30T07:51:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "25db4591a5... |
2673d204-5cf6-413d-ba11-6d8658f223c0 | DenysRisukhin/c-Tests | course/Tasks_DataStruct_OOP/DataStruct/Tree/Tasks/Tree_1_b.h | //
// Tree_1_b.h
// Test2019
//
// Created by <NAME> on 1/19/24.
// Copyright © 2024 DenysRisukhin. All rights reserved.
//
#ifndef Tree_1_b_h
#define Tree_1_b_h
#include <iostream>
#include <queue>
#pragma mark - search binary tree
template <class T>
class binary_search_tree: public binary_tree<T>
{
public:
... | ALGO | 0.998541 | 3.984404 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2020-01-07T18: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": "54ee95054... |
63887e7a-19b0-4de9-a47f-659a541272f0 | ishandutta2007/codeforces-d | dmga44/normal/1718/C.cpp | #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,avx2,fma,tune=native")
#pragma GCC option("arch=native", "no-zero-upper") // Enable AVX
/// UH Top
#include <bits/stdc++.h>
#define db(x) cerr << #... | ALGO | 0.998961 | 4.014512 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a6363944671... |
93dc6a9c-abcb-46bd-9368-dfd7f51f4652 | a-vodka/qt_fem | elem/ShapeQuad2D.cpp | #include "ShapeQuad2D.h"
#include "../util/UTIL.h"
namespace elem
{
using UTIL = util::UTIL;
int ShapeQuad2D::degeneration(std::vector<int> &ind)
{
int deg = 0;
for (int i = 0; i < 7; i += 2)
{
if (ind[i] == ind[i + 1])
{
deg = (i + 5) % 8;
break;
}
}
return deg;
}
void ShapeQuad2D::s... | ALGO | 0.997784 | 4.755579 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-01-21T18:24: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": "d1a0adf8122a... |
bd116b0d-a046-4566-adc4-dd9a072f24e9 | heisenberg2002/filter | setting_exploration_route.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <cstring>
#include <algorithm>
#include <climits>
using namespace std;
const int INF = 1e9;
const int MAX_POINTS = 15;
int R, C;
vector<string> grid;
vector<pair<int, int>> points;
int dist[MAX_POINTS][MAX_POINTS];
int dp[1 << MAX_POINTS][MAX_POINTS];
/... | ALGO | 0.999941 | 5.71906 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2025-01-16T12:10:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f6eefc2e64... |
39650e04-74f3-4a9c-8cf6-df193c0372c3 | FranciscoVF/VillarrealFelixFranciscoJavier | 32.cpp | // 32.cpp : Este archivo contiene la función "main". La ejecución del programa comienza y termina ahí.
//
#include <iostream>
using namespace std;
int main()
{
int num1, num2, num3, num4, num5, num6;
cout << "\n\n 32.- Comparar 2 triangulos para ver si son congruentes\n";
cout << "------------------------... | ALGO | 0.999403 | 5.261773 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-01-30T22:38:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "577e70549... |
b9acb22c-26b6-4a21-98f8-bc118a5d7933 | Ujala-2110/DSA_Cpp | Graph/Articulation_point_SUBMERGE.cpp | #include <bits/stdc++.h>
#define ll long long
using namespace std;
vector<int> adj[100001];
int vis[10001], tin[10001], low[10001];
set<int> AP;
int timer;
void dfs(int node, int par)
{
vis[node] = 1;
tin[node] = low[node] = timer++;
int ch_cnt = 0;
for (int ch : adj[node])
{
if (ch == pa... | ALGO | 0.999499 | 4.5195 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-07-14T13:16: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": "b1c823298a3d... |
72db02db-d8d1-4f24-9cff-c38b49fafb23 | Camithilwen/Code-Cloning-Analysis | src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p00767/s785295769.cpp | #include <iostream>
#include <cmath>
using namespace std;
int main(int argc, char *argv[])
{
int w, h, diag, i, j;
while (cin >> w >> h, w | h) {
diag = w * w + h * h;
i = 0;
while (1) {
i++;
j = sqrt(diag - i * i);
if (i >= j) {
diag+... | ALGO | 0.99972 | 3.750768 | {
"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": "e675fd8b21... |
ef7db4a8-a2ad-4649-bc97-47d395df8745 | Kenshin2438/CP-Code-Collection | Contest/NWERC 2016/E.cpp | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.hpp"
#else
#define debug(...) 42
#endif
#define PII pair<int, int>
#define vec vector
#define str string
#define fi first
#define se second
#define all(a) (a).begin(), (a).end()
#define SZ(x) static_cast<int>((x).size())
using db = double;
us... | ALGO | 0.99989 | 3.553408 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2022-04-15T06:16:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3e4dd4944... |
ca9d0943-5213-4719-bf2a-146a7f836d80 | riyameheta/lp3 | huffmanC.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <unordered_map>
using namespace std;
// A node of the Huffman tree
struct HuffmanNode {
char data;
int freq;
HuffmanNode *left, *right;
HuffmanNode(char data, int freq) {
left = right = nullptr;
this->data = data;
... | ALGO | 1 | 5.510554 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-11-05T02:07: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": "8d267c646f49... |
1ff15054-9424-4d75-a659-c49409223c9d | Centimeter-AP/MFC_Tool-Teamproject | TeamProject/Client/CAstarMgr.cpp | #include "pch.h"
#include "CAstarMgr.h"
#include "ObjMgr.h"
IMPLEMENT_SINGLETON(CAstarMgr)
CAstarMgr::CAstarMgr()
{
}
CAstarMgr::~CAstarMgr()
{
Release();
}
void CAstarMgr::Start_Astar(const D3DXVECTOR3& vStart, const D3DXVECTOR3& vGoal)
{
Release();
CObj* pMyTerrain = CObjMgr::Get_Instance()->Get_Terrain();
ve... | ALGO | 0.973619 | 4.410032 | {
"github_metadata": {
"branch": "main",
"commit_count": 116,
"repo_created_at": "2025-01-24T05:43:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0ebf38b46... |
044aadb4-1daf-4495-ad19-56722cc59cbe | yuxiangliu-beginner/leetcodeQuestions | constructBinaryTreeFromPreorderandInorder.cpp | /**
* Definition for a binary tree node.
* 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), l... | ALGO | 0.999991 | 6.06365 | {
"github_metadata": {
"branch": "main",
"commit_count": 146,
"repo_created_at": "2021-04-25T06:28:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5972426b26... |
a7cbf62f-2b6b-44d3-9690-1a51dfa498af | mchaisso/blasr | alignment/DotPlot.cpp | #include <string>
#include <iostream>
#include <vector>
#include <set>
#include <sstream>
#include <pthread.h>
#include <stdlib.h>
#include <time.h>
#include <signal.h>
#include <execinfo.h>
#include "FASTASequence.h"
#include "SMRTSequence.h"
#include "FASTAReader.h"
#include "SeqUtils.h"
#include "algorithms/anchorin... | ALGO | 0.995657 | 4.342258 | {
"github_metadata": {
"branch": "master",
"commit_count": 120,
"repo_created_at": "2014-02-13T20:03:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 21,
"forks": 16,
"issues": 7,
"pull_requests": 0
},
"file_meta": {
"content_id": "e2c9d3... |
6431ae3a-8a88-4221-b612-ead417320aa3 | lardratboy/DitherStudio | TNSphereOperations.h | // ----------------------------------------------------------------------------
/*
The MIT License (MIT)
Copyright (c) 2000- <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restric... | ALGO | 0.999004 | 5.60227 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2022-01-23T21:28:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1da4077d1... |
e7041095-5c8a-45ea-a478-5c93266f4856 | asrivast28/tsp-solver | code/driver.cpp | #include "ProgramOptions.hpp"
#include "Timer.hpp"
#include "TSPInstance.hpp"
#include "BranchAndBound.hpp"
#include "MSTApproximation.hpp"
#include "GreedyHeuristic.hpp"
#include "GeneticAlgorithm.hpp"
#include "IteratedLocalSearch.hpp"
#include <fstream>
#include <iostream>
#include <sstream>
#include <boost/filesy... | ALGO | 0.99821 | 5.791677 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2017-02-15T22:36: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": "7ca290813... |
0f9389b4-a3a7-48bf-9536-e18093ab8bd9 | yamate11/compprog | zCodeForces/r619_2/d/cans.cc | #include <bits/stdc++.h>
#include <cassert>
typedef long long int ll;
using namespace std;
// @@ !! LIM()
int main(/* int argc, char *argv[] */) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout << setprecision(20);
ll N, M, K; cin >> N >> M >> K;
if (K > 4 * N * M - 2 * N - 2 * M) {
cout << "... | ALGO | 0.999976 | 3.838383 | {
"github_metadata": {
"branch": "main",
"commit_count": 219,
"repo_created_at": "2021-03-11T06:12:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a5e42bcf6c... |
63800bd8-d2b5-45fb-8467-880a64932219 | bc970321/linux-PC | 3.面试相关/0.中科龙智/Answer2.cpp | /*************************************************************************
> File Name: text1.cpp
> Author: candy7
> Mail: <EMAIL>
> Created Time: 2019年08月07日 星期二 11时27分40秒
************************************************************************/
#include <iostream>
#include <cstdio>
#include <c... | ALGO | 0.998857 | 3.751508 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-09-14T07:31:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "6adeb53619... |
e6f7da6d-8187-4927-ba73-8cb706dfa420 | jvillanop/LaboratorioMatrices | main.cpp | #include <iostream>
#include <ctime>
#include "matrices.h"
using namespace std;
int main() {
// Inicializar la semilla del generador de números aleatorios
srand(time(nullptr));
// Declarar matrices para cada facultad
float matriz_facultad_1[Matrices::NUMERO_ALUMNOS][Matrices::NUMERO_NOTAS + 1];
f... | TOOL | 0.998999 | 5.281882 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-08T20:39:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "879db0bb44b5... |
bf83d8a2-c2c1-4698-8400-8126d342a24e | Parkgod98/Algorithm_Cpp | SWEA/D3/1221. [S/W 문제해결 기본] 5일차 - GNS/[S/W 문제해결 기본] 5일차 - GNS.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
using namespace std;
string arr[10] = { "ZRO", "ONE", "TWO", "THR", "FOR", "FIV", "SIX", "SVN", "EGT", "NIN" };
int main() {
int T;
cin >> T;
for (int tc = 1; tc <= T; ++tc) {
string a, b;
cin >> a >> b;
int n =... | ALGO | 0.997196 | 4.269469 | {
"github_metadata": {
"branch": "main",
"commit_count": 775,
"repo_created_at": "2024-09-02T10:16: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": "bdfc83245e... |
5c03b69a-6205-4c72-bd64-db0de258fd6b | easyfly007/carnd_term2_proj | test/07_sigma_point_prediction/ukf.cpp | #include <iostream>
#include "ukf.h"
UKF::UKF()
{
init();
}
UKF::~UKF()
{}
void UKF::init()
{}
void UKF::sigmaPointPrediction(MatrixXd *Xsig_out)
{
int n_x = 5;
int n_aug = 7;
MatrixXd Xsig_aug = MatrixXd(n_aug, 2 * n_aug + 1);
Xsig_aug <<
5.7441, 5.85768, 5.7441, 5.7441, 5.7441, 5.7441, 5.... | ALGO | 0.930453 | 5.008114 | {
"github_metadata": {
"branch": "master",
"commit_count": 208,
"repo_created_at": "2017-11-03T02:08: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": "2e3602a6... |
ef414d39-21ab-435b-bbf3-7d5304aff8a0 | Niden36/chess | Chess game/check.cpp |
#include <iostream>
#include <iomanip>
#include <string>
#include "check.h"
#include "pawns.h"
#include "bishops.h"
#include "rooks.h"
#include "springers.h"
#include "queens.h"
#include "kings.h"
#define white_pawn 112
#define black_pawn 80
#define white_bishop 98
#define black_bishop 66
#define white_rook 114
#defi... | ALGO | 0.980718 | 3.903792 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2016-09-17T19:53: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": "025562f77f... |
5aa92445-4a7a-44e4-a189-a34f650ae8a5 | SSAFYnity/Job-Preparation-Challenge-1st | Programmers/수식최대화/수식 최대화_김종현.cpp | #include <string>
#include <vector>
using namespace std;
string comp[6][3] = {{"+", "-", "*"},
{"+", "*", "-"},
{"*", "-", "+"},
{"*", "+", "-"},
{"-", "+", "*"},
{"-", "*", "+"}};
vector<string> split(string str) ... | ALGO | 0.999994 | 4.756603 | {
"github_metadata": {
"branch": "main",
"commit_count": 882,
"repo_created_at": "2024-07-14T00:10:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 186
},
"file_meta": {
"content_id": "769505c25... |
7ad84dac-309b-4d46-a3ce-df3d70305840 | nvkuy/CompetitiveProgramming | CodeForces/EvenSubarrays.cpp | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update>
#define endl '\n'
#pragma GCC optimize("O3,... | ALGO | 0.999895 | 4.670343 | {
"github_metadata": {
"branch": "master",
"commit_count": 121,
"repo_created_at": "2022-01-21T04:40:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5f71459c... |
8b841f3b-c4f8-445a-9a84-1b897f1dde5d | forksnd/handmadehero-maestro92 | Notes/day158 - Tracking Asset Usage.cpp | Handmade Hero Day 158 - Tracking Asset Usage
Summary:
First implemented allocation functions using the OS new allocate and free functions.
In this case, we are using the windows VirtualAlloc and VirtFree.
added the fields in the game_assets to keep track of the memory usage in our asset system
wrote the EvictAssets... | ALGO | 0.938408 | 7.416901 | {
"github_metadata": {
"branch": "master",
"commit_count": 307,
"repo_created_at": "2020-05-10T14:00: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": "353bd900... |
5341dcfa-b530-4063-b272-b5e3cbb642c1 | yuran1811/DSA-Solutions | DSACollection/String/SuffixAutomaton.cpp | /**
Usage:
* Finding longest repeating substring
* Number of distinct substrings
* Number of distinct substrings length i
*/
#include <iostream>
#include <string>
#define sz(s) (int(s.size()))
using namespace std;
const int N = 1e5 + 5;
const int A = 26;
struct Node {
Node *link, ... | ALGO | 0.999893 | 3.630297 | {
"github_metadata": {
"branch": "main",
"commit_count": 228,
"repo_created_at": "2021-09-24T01:59:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f1ccd167d... |
085069ab-ee21-4184-9e87-f435ac1b622e | rohitpothuri/dsalgo | c++/1007queuereversefirstkelements.cpp | #include <cmath>
#include <cstdio>
#include <stack>
#include <queue>
#include <iostream>
#include <algorithm>
using namespace std;
void reverseQueueFirstKElements(int k, queue<int>& Queue)
{
int qSize = Queue.size();
if (Queue.empty() == true || k > qSize)
return;
if (k <= 0)
return;
... | ALGO | 0.999893 | 4.048651 | {
"github_metadata": {
"branch": "develop",
"commit_count": 98,
"repo_created_at": "2022-08-25T20:22:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "73ad9fd4... |
933305e2-be20-4b55-9bb8-164560e4b3f4 | Kunal2703/DSA-Practice-Qus | stack/739_Daily_Temperatures.cpp | //---739. Daily Temperatures---
// Given an array of integers temperatures represents the daily temperatures,
// return an array answer such that answer[i] is the number of days you have to wait
// after the ith day to get a warmer temperature. If there is no future day for which
// this is possible, keep answer[i]... | ALGO | 0.99999 | 6.067916 | {
"github_metadata": {
"branch": "main",
"commit_count": 208,
"repo_created_at": "2022-01-15T11:05: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": "2438f79720... |
fcbccfb2-4d40-4b5f-ac1d-ffe311304995 | aligusnet/optimer | src/tsp/symmetric/lagrangean_stsp.h | // Copyright (c) 2013-2014 <NAME>. All rights reserved.
#ifndef TSP_SYMMETRIC_LAGRANGEAN_STSP_H_
#define TSP_SYMMETRIC_LAGRANGEAN_STSP_H_
#include <bnb/tree.h>
#include <tsp/common/types.h>
#include <tsp/symmetric/common.h>
#include <tsp/symmetric/lagrangean.h>
namespace bnb {
struct Stats;
} // namespace bnb
name... | ALGO | 0.999902 | 6.382008 | {
"github_metadata": {
"branch": "master",
"commit_count": 125,
"repo_created_at": "2017-01-11T07:08: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": "06605d4c... |
0e19b6d9-4be0-43fa-b7af-0c49855f8f8b | zjsxzy/algo | Ural/P1182.cpp | #include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <bitset>
#include <vector>
#include <cstdio>
#include <string>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 205;
int N;
in... | ALGO | 0.99998 | 3.770553 | {
"github_metadata": {
"branch": "master",
"commit_count": 1296,
"repo_created_at": "2013-05-18T10:52:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "17511c9... |
27886a1a-80e0-4429-8f21-9e3ca3d057e6 | ishandutta2007/codeforces-m | mr_eight/normal/1508/A.cpp | //#include <bits/stdc++.h>
#include <iostream>
#include <iomanip>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <climits>
#include <functional>
#include <cstring>
#include <string>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <dequ... | ALGO | 0.999906 | 3.46151 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03: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": "79ecdf59250a... |
0d4e8e2d-6727-42ab-adbf-4b5d0d4d7b46 | ishandutta2007/codeforces-s | syury/normal/566/A.cpp | #pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("tune=native")
#include<bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define I(x, a) for(auto x : (a))
#define ins insert
#define F(i, l, r) for(auto i = (l); i < (r); i++)
#define DF(i, l, r) for(auto i = (l); i >= (r); i--)
... | ALGO | 0.999968 | 3.543787 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "be8486872017... |
af7721ec-a2ef-4744-a262-e0c9df83450e | jin09/code_ing-for-fun | data-structures/BST/predecessor.cpp | #include<bits/stdc++.h>
using namespace std;
class BST;
class binaryTreeNode{
public:
int data;
binaryTreeNode* left;
binaryTreeNode* right;
binaryTreeNode* parent;
binaryTreeNode(int data){
this->data = data;
left = NULL;
right = NULL;
parent = NULL;
}
};
/*@... | ALGO | 0.999988 | 4.215431 | {
"github_metadata": {
"branch": "master",
"commit_count": 194,
"repo_created_at": "2016-06-15T03:11: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": "87f39564... |
38ceb2a1-0b04-4a99-b0e2-ffb5c03f3a2f | arunnaidu123/cheetah_lite | cheetah/modules/sps_clustering/SpsClustering.h | /*
* The MIT License (MIT)
*
* Copyright (c) 2016 The SKA organisation
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | ALGO | 0.99332 | 7.393312 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-08-26T14:19: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": "14bd3948983... |
a4db1539-98ed-4665-9632-5823f00886bc | Xilinx/Vitis_Libraries | solver/L1/include/xf_solver_L1.hpp | /*
* Copyright 2021 Xilinx, Inc.
*
* 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... | CONFIG | 0.986159 | 3.251485 | {
"github_metadata": {
"branch": "main",
"commit_count": 471,
"repo_created_at": "2019-09-23T19:13:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 988,
"forks": 381,
"issues": 0,
"pull_requests": 12
},
"file_meta": {
"content_id": "9ce9d7... |
a64baedf-cfa9-4fb6-b230-a2c1ce308f4e | YOAOY/PRP | problem_self.h | #ifndef PROBLEM_SELF__
#define PROBLEM_SELF__
#include "problem_base.h"
#include <vector>
using namespace std;
// You can add your own problem here.
class CProblemSelf : public BProblem
{
public:
CProblemSelf(std::size_t num_vars, std::size_t num_objs, const std::string name);
virtual std::size_t num_variables()... | ALGO | 0.914151 | 3.874935 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2018-07-29T08:51:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "54a98f4e5... |
d31e4b38-cdd4-41d0-8361-0984d04d66d9 | abhinavmittal15/Data-Structure-Algorithm | LeetCode/1052. Grumpy book Store Owner/1052_GrumpyBookstoreOwner.cpp | #include<iostream>
#include<vector>
using namespace std;
class Solution{
public:
int maxSatisfied(vector<int>& customers, vector<int>& grumpy, int minutes){
int l = 0;
int curr_window = 0;
int max_window = 0;
int satisfied = 0;
for(int r = 0; r < customers.size(); r++){
... | ALGO | 0.999948 | 5.721737 | {
"github_metadata": {
"branch": "main",
"commit_count": 284,
"repo_created_at": "2024-03-01T07:06:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d2b96f4377... |
9cad15a8-e11b-4b5b-a385-eb48791c678c | shivang-16/Data-Structure-Algorithm | Phase2ClassCode/Linked List/Questions/MergeSortInLinkedList.cpp | #include<iostream>
using namespace std;
class node{
public:
int data;
node* next;
node(int data){
this->data = data;
this->next = NULL;
}
};
//insterion of node
void InsertAtTail(node* &tail,int d){
node* temp= new node(d);
tail->next= temp;
tail= tail->next;
}
void ... | ALGO | 0.999996 | 5.643322 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2023-04-24T05:41:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "650cd26ac9b... |
7f933356-6325-4625-a957-2d2b6482f665 | TraiNguyenVan/cpp-2.0 | testbro/CHUDEDUYET/LOOP.CPP | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll sl(ll n, ll k) {
ll kq = 0;
while (n % k == 0) {
kq++;
n /= k;
}
return kq;
}
int main() {
ifstream fi("LOOP.INP");
ofstream fo("LOOP.OUT");
ll n, k;
fi >> n >> k;
vector<ll> a(n);
ll res = 0... | ALGO | 0.999968 | 3.761104 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-04-27T13:28: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": "f884e6466e3b... |
3e04cba4-c1b0-4a31-aa47-8da5d262d686 | usnistgov/OOF3D | SRC/engine/edge.C | // -*- C++ -*-
/* This software was produced by NIST, an agency of the U.S. government,
* and by statute is not subject to copyright in the United States.
* Recipients of this software assume all responsibilities associated
* with its operation, modification and maintenance. However, to
* facilitate maintenance we... | ALGO | 0.991038 | 7.455529 | {
"github_metadata": {
"branch": "master",
"commit_count": 747,
"repo_created_at": "2015-01-21T19:04:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 37,
"forks": 8,
"issues": 3,
"pull_requests": 1
},
"file_meta": {
"content_id": "277a61ac... |
3a5007e6-1d74-4941-8aff-75d2f4e004e1 | subham-202/FINAL450 | String/areRotations2.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
// Function to check if two strings are rotations of each other or not.
bool areRotations(string s1, string s2) {
// Check if lengths are equal
if (s1.length() != s2.length())
return false;
int n = s1.leng... | ALGO | 0.999799 | 5.844156 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-04-01T07:37: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": "d19d4e394b5... |
b8f8765e-d5e5-459a-adc7-a3a69a1ea016 | HARIOM317/Learn-Programming-Languages | C++/13 object oriented programming/10. Miscellaneous/nesting_of_member_function.cpp | #include <iostream>
#include <string>
using namespace std;
class binary
{
private:
string s;
void chk_bin(void);
public:
void read(void);
void ones_complement(void);
void display(void);
};
void binary ::read(void)
{
cout << "Enter a binary number: ";
cin >> s;
}
void binary ::chk_bin(vo... | ALGO | 0.987309 | 4.963463 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2025-03-18T05:18: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": "25ba2f7a354... |
6132eabb-cc48-4183-8fe8-ddac488196dd | memeghaj10/important_progamming_stuff | Graphs/Steps_By_Knight_Imp_Problem.cpp | #include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
bool isValid(int x,int y,int N) {
return x>=1&&x<=N&&y>=1&&y<=N;
}
//Function to find out minimum steps Knight needs to reach target position.
int minStepToReachTarget(ve... | ALGO | 0.999887 | 5.773748 | {
"github_metadata": {
"branch": "master",
"commit_count": 704,
"repo_created_at": "2020-05-08T13:58:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0508c413... |
0cfea477-0e84-476a-bd81-ef7ff2a488f6 | atupal/codeforces | contests/267DIV2/c.cpp | #include <cstdio>
#include <algorithm>
using namespace std;
long long dp[5010][5010], sum[5010];
int a[5010];
const long long Inf = 1LL << 60;
int main() {
int n, m, K;
scanf("%d%d%d", &n, &m, &K);
for (int i = 0; i < n; i ++) {
scanf("%d", &a[i]);
}
sum[0] = a[0];
for (int i = 1; i <... | ALGO | 0.999779 | 3.428151 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2013-05-12T16:03:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f1ad05585... |
616dbe86-1ae9-448d-97ef-d75f834fad63 | kavita121/Coding | CheckIfPossibleToSurviveOnIsland_GFG.cpp | //Check if it is possible to survive on Island
//CORRECT GFG
//Greedy
void isSurvivalPossible(int s, int n, int m)
{
//we can't buy enough food for a day
if (m > n)
cout << "NO";
else
{
bool possible;
//if we can not survive for 7 days with 6 days food then survival not possib... | ALGO | 0.999887 | 3.893961 | {
"github_metadata": {
"branch": "master",
"commit_count": 154,
"repo_created_at": "2020-09-05T16:26: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": "436503f6... |
a0e016ad-653d-4750-9bfd-8bf791e9afb0 | kabraneel/Competitive-Programming | Codechef/MARLTIME/C1.cpp | // na ho paega humse
// nai_aati_coding
// i love PD
// Motivation when feeling low : http://bitly.com/98K8eH
#include <bits/stdc++.h>
#include <chrono>
using namespace std;
#define int long long
#ifdef KABRANEEL
#define LOCAL
#include "/home/kabraneel/coding/debug.h"
#else
#define debug(x...)
#define debugln(x...)
#e... | ALGO | 0.999912 | 4.209064 | {
"github_metadata": {
"branch": "main",
"commit_count": 72,
"repo_created_at": "2021-08-18T06:00:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d816e89fb3... |
451dcad5-ef64-43c3-a20d-4d5e7fa5c3fe | jacobsayono/cs-32 | projects/project-3/Game.h | #ifndef Game_h
#define Game_h
#include "Side.h"
#include "Player.h"
#include <stdio.h>
class Game {
public:
Game(const Board& b, Player* south, Player* north);
// Construct a Game to be played with the indicated players on a copy of the board b. The player on the south side always moves first.
... | ALGO | 0.913159 | 4.554316 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2023-03-30T03:38:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8717d6ad5... |
25c7ab3e-671e-4ee1-b7f3-13761f27f40c | superZina/algorithm | 백준/Silver/2108. 통계학/통계학.cc | #include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main(int argc, const char * argv[]) {
int n;
cin >> n;
int nums[n];
int count[8001];
double sum = 0;
for(int i=0; i <= 8000; i++) {
count[i] = 0;
}
for(int i=0; i<n; i++) {
... | ALGO | 0.999978 | 4.139364 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2020-06-23T14:01: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": "36b0baf21... |
e4cc5208-160b-467a-b433-8d56102e7cf7 | uskw/cppPratice | CustomString/CustomString.cpp | #include <iostream>
#include <vector>
#include "CustomString.h"
using namespace std;
CustomString::CustomString() {
k_string = nullptr;
k_length = 0;
}
CustomString::CustomString(const char* str) {
if (str == nullptr) {
k_string = nullptr;
k_length = 0;
}
else {
k_length = strlen(str);
k_string = new ch... | TOOL | 0.973511 | 4.160953 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-04-14T09:56: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": "f88e31218b9b... |
494ff27e-bdb5-46be-bc41-11a98cd13744 | notkamonohasi/Algorithm | UnionFind.cpp | /* 重み付きUnionFind
* verify : https://atcoder.jp/contests/abc214/submissions/34906883
*/
struct UnionFind {
vector<ll> par, rank, weight;
UnionFind(ll n) : par(n, -1), rank(n, 0), weight(n, 1){}
// 途中で重みを足すのには対応していない
void setWeight(ll k, ll w){
weight[k] = w;
}
ll root(ll x){
... | ALGO | 0.999888 | 4.826419 | {
"github_metadata": {
"branch": "main",
"commit_count": 66,
"repo_created_at": "2022-09-02T12:40: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": "92ffaa7bb1c... |
b9079b75-6bec-4d05-9da4-a420fd253edf | Ahad-41/Competitive-Programming | Problem-Soving/LightOJ/1224.cpp | #include <bits/stdc++.h>
using namespace std;
typedef int ll;
void answer();
struct node {
bool endmark = false;
ll count = 0;
node *child[4] = {NULL};
};
node *rootNode;
ll ans;
ll getIndx(char ch){
if (ch == 'A') return 0;
if (ch == 'C') return 1;
if (ch == 'G') return 2;
retur... | ALGO | 0.999366 | 4.247888 | {
"github_metadata": {
"branch": "main",
"commit_count": 132,
"repo_created_at": "2024-06-13T08:58: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": "66ed683c07... |
ad304648-3c4c-44a4-8534-9086ff93ec0f | KDev-Huh/Turing-Lab | C++/13-1.그래프(메인).cpp | #include <iostream>
#include <vector>
#include <string>
#include <fstream> //파일 접근
#include <iomanip>
#include <stack>
using Graph = std::vector<std::vector<int>>;
class AdjMatrix {
public:
void load(std::string);
void insertVertex(int);
void insertEdge(int, int);
void deleteEdge(int, int);
void adjacent(int);... | ALGO | 0.996758 | 4.49399 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2024-05-04T05:34: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": "6286389aa... |
74bb9ae8-6346-42cc-93de-c3d68cd5574d | blmarket/icpc | 2019/r1a/A.cc | #include <iostream>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <sstream>
#include <numeric>
#include <iterator>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <functional>
#define mp make_pair
#defin... | ALGO | 0.999033 | 3.61118 | {
"github_metadata": {
"branch": "master",
"commit_count": 8271,
"repo_created_at": "2012-04-15T03:31:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "65ba8e7... |
8a822f3b-59d6-43e5-9872-5df356ea9f3e | tblaineau/stage2018 | tsht.cc | /*
in piapp
c++import SkyMap
c++import Samba
delobjs *
c++execfrf tsht.cc
*/
// Generate an input spectra a + b* l + c * gaussienne(l, 50, 20)
int lmax = 192;
Vector clin(lmax+1);
for(int l=0; l<=lmax; l++) {
double xx = (l-50.)/10.;
clin(l) = 1.e-2*(1.-(double)l/(double)lmax) + 0.1*exp(-xx*xx);
}
// Create a s... | WEB | 0.936513 | 5.033247 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2018-04-26T15:11: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": "2f9f23bbf... |
cf52eb56-707c-442b-97b6-29888abfef8a | ikechukwuhenry/cryptography-christof-lecture-in-cpp | string_to_bits.cpp | #include<string>
#include<bitset>
#include<iostream>
#include<vector>
using namespace std;
string cars[10];
int main(){
string greetings = "hello world";
std::bitset<8> b3{"00110101"};
cout << "key: " << b3 <<endl;
for(std::size_t i=0; i < greetings.size(); ++i){
// cout << bitset<8> (greetin... | ALGO | 0.999748 | 3.249754 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-12-25T12:20: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": "e364b5635ece... |
7ab4bb05-8817-4e6f-a3ff-90883dc44506 | yunusbahari/TA-CTSTRING | CHEATCONV3.cpp | #include <cstdio>
#include <algorithm>
#include <cstring>
#include <ctime>
#include <map>
#include <stack>
#include <vector>
#define MOD 1000000007
#define MNODE 200
using namespace std;
int NID = 0;
int DID = 0;
template <typename T>
struct labelset{
unsigned long long hash_id;
T dt[101];
int data;
/... | ALGO | 0.999845 | 3.418975 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2015-03-04T15:58: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": "7b22436e8... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.