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 |
|---|---|---|---|---|---|---|---|
37a99f5d-04cd-4b52-a63f-d5e5972cfcbd | aSpanefRost/CodingNInjas | Language Tools/Warm_Reception.cpp | // Warm Reception
// Send Feedback
// There is only one beauty parlour in the town CodingNinjasLand. The receptionist at the beauty parlor is flooded with appointment requests because the “Hakori” festival is round the corner and everyone wants to look good on it.
// She needs your help. The problem is they don’t have ... | ALGO | 0.99993 | 4.031657 | {
"github_metadata": {
"branch": "main",
"commit_count": 116,
"repo_created_at": "2021-05-03T06:02: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": "fefb234d76... |
73ce99f7-2bb0-448a-809a-93727f57ca89 | lnkkerst/oj-codes | src/luogu/UVA1644/26289614_ac_undefined_0ms_0k_noO2.cpp | // // // // #include <cstdio>
// // // // #include <iostream>
// // // // #include <cstring>
// // // // #include <algorithm>
// // // // #include <vector>
// // // // #include <queue>
// // // // using namespace std;
// // // // struct Node {
// // // // int dep, du;
// // // // bool vis, end;
// // // // ... | ALGO | 0.999934 | 3.694943 | {
"github_metadata": {
"branch": "main",
"commit_count": 56,
"repo_created_at": "2022-03-23T15:37:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dbc5ffbc70b... |
7afd3f77-80ef-4910-a381-72d0ee32d674 | nermeenwageh10/Leetcode-Solutions | Solutions/C++/0019-remove-nth-node-from-end-of-list/0019-remove-nth-node-from-end-of-list.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* removeNthFromEnd(ListNode* head, int n) {
ListNode* tem = head ;ListNode* prv = head ;
int sz = 0 ;
while (... | ALGO | 0.999984 | 5.508298 | {
"github_metadata": {
"branch": "main",
"commit_count": 652,
"repo_created_at": "2023-02-16T12:25:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 315,
"forks": 83,
"issues": 3,
"pull_requests": 3
},
"file_meta": {
"content_id": "8caf2a0... |
f692aeb6-e7ce-4ecc-89e0-cd557fbc5dfb | ishaan0/Competitive-Programming | Graph/CycleDetectionBfs.cpp | #include<bits/stdc++.h>
using namespace std ;
#define pb push_back
vector<int> adj[100000] ;
vector<bool> visited(100000) ;
vector<int> parent(100000,-1) ;
void addEdge(int u, int v){
adj[u].pb(v) ;
adj[v].pb(u) ;
}
bool BFS(int src){
queue<int> q ;
q.push(src) ;
parent[src] = -1 ;
visited[sr... | ALGO | 0.99983 | 3.779651 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-09-08T16:21:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c4a20efa113... |
4fe21e02-c595-48f6-b806-1dcb7b9c3b0a | avcopan/MPACK | mlapack/library/Rgbtrf.cpp | /*
* Copyright (c) 2008-2010
* <NAME>
* All rights reserved.
*
* $Id: Rgbtrf.cpp,v 1.10 2010/08/07 04:48:32 nakatamaho Exp $
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions o... | ALGO | 0.99944 | 4.221594 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2019-12-18T18:49:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c91edb1e6... |
93b33619-37f1-447c-bfa9-45ee37dc1560 | Mann-Chandarana/Leetcode_Challenges | Graphs/Striver/BFS_DFS/GK3_VII.cpp | /* Safe Nodes */
#include <bits/stdc++.h>
using namespace std;
bool dfs(int node, vector<int> &vis, vector<int> &pathvis, vector<int> adj[])
{
vis[node] = 1;
pathvis[node] = 1;
for (auto it : adj[node])
{
if (vis[it] == 0)
{
if (dfs(it, vis, pathvis, adj) == false)
... | ALGO | 0.999779 | 4.626082 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2023-10-14T18:31: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": "44a4746ae7e... |
269df972-a06e-48f2-801b-4b9acef58992 | MDRobiulhassan/Codeforces | 1607A.cpp | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
string s1, s2;
cin >> s1;
cin >> s2;
int size1 = s1.size();
int size2 = s2.size();
int a[size2], k = 0;
//sort(s2.begin(), s2.end());
... | ALGO | 0.99996 | 4.460429 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2023-11-01T17:53:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72f51b81b73... |
2ccc82c0-57a6-44d5-bc50-3f588438c155 | prekshajagetiya123/Online-Judges-1 | HackerRank/STL/lower_bound.cpp | // https://www.hackerrank.com/challenges/cpp-lower-bound/problem
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n , inp , query;
cin >> n;
vecto... | ALGO | 0.999984 | 4.176533 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2019-10-08T10:20: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": "1869ad09e... |
ce9a34a6-4548-4462-bf3b-10483af72b46 | joaander/hoomd-blue | hoomd/md/TwoStepBerendsenGPU.cc | // Copyright (c) 2009-2021 The Regents of the University of Michigan
// This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.
// Maintainer: joaander
/*! \file TwoStepBerendsenGPU.cc
\brief Defines TwoStepBerendsenGPU
*/
#include "TwoStepBerendsenGPU.h"
#include "TwoStepBerendsenG... | ALGO | 0.938556 | 6.550453 | {
"github_metadata": {
"branch": "master",
"commit_count": 17444,
"repo_created_at": "2016-03-07T01:34:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 19,
"forks": 14,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "6757... |
b7315a51-2775-4ef6-b731-6e36b16310e0 | KatsuyaKikuchi/ProgrammingContest | AtCoder/Virtual/20200623/F.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pll;
#define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i))
#define REP(i, n) FOR(i,n,0)
#define OF64 std::setprecision(10)
const ll MOD = 1000000007;
const ll INF = (ll) 1e15;
struct Vertex {
vector<ll> node;
};
ll N, M;... | ALGO | 0.999968 | 3.891564 | {
"github_metadata": {
"branch": "master",
"commit_count": 87,
"repo_created_at": "2020-12-04T21:42: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": "f215a4fe4... |
a7e610d9-1026-45b8-9e3f-c4f0465ddba8 | vanttecmty/Boat-Remote-Control | controladordp.ino | #include <Servo.h>
byte C1 = 3;
byte C2 = 5;
int V1;
int V2;
Servo TR;
Servo TL;
void setup() {
pinMode(C1, INPUT);
pinMode(C2, INPUT);
TR.attach(9);
TL.attach(10);
TR.writeMicroseconds(1500);
TL.writeMicroseconds(1500);
delay(1000);
Serial.begin(9600);
}
void ReadValues () {
V1 = pulseIn(C1,... | TOOL | 0.976073 | 5.116137 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2017-05-14T17:15:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5e346e47f... |
12b9d7e9-5be6-4e2a-a833-536503d252f1 | DeshratnaBharti/Leetcode | LeetCode/Medium/2901-longest-unequal-adjacent-groups-subsequence-ii/2901-longest-unequal-adjacent-groups-subsequence-ii-05-16-2025-09-30-18.cpp | class Solution {
public:
bool check(string &s1, string &s2) {
int diff = 0;
for(int i = 0; i < s1.length(); i++) {
if(s1[i] != s2[i]) diff++;
if(diff > 1) return false;
}
return diff == 1;
}
vector<string> getWordsInLongestSubsequence(vector<string>&... | ALGO | 0.999992 | 5.562943 | {
"github_metadata": {
"branch": "main",
"commit_count": 1140,
"repo_created_at": "2024-09-09T13:15: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": "a67cfd4dc... |
9d91f601-2ba2-497e-a331-28553b8f037c | fm16191/heat_equation | heat_equation_2d.cxx | #include <cmath>
#include <fstream>
#include <getopt.h>
#include <iomanip>
#include <iostream>
#include <vector>
// Defaults
double NB_X = 200;
double NB_Y = 200;
double NB_T = 2000;
double D = 2.3e-5;
double DT = 0.001;
double DX2;
double DY2;
bool USE_FINITE_VOLUME_METHOD = false;
int write_interval = 0;
std::str... | ALGO | 0.994473 | 5.614994 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2024-01-05T14:16:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a82734d324... |
077354f5-c557-44b8-8393-513f8e895e64 | jim2832/Leetcode | 0129-sum-root-to-leaf-numbers/0129-sum-root-to-leaf-numbers.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.999934 | 6.005072 | {
"github_metadata": {
"branch": "main",
"commit_count": 3319,
"repo_created_at": "2023-06-10T06:37: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": "6db358c64... |
73cf6397-8563-40f4-a49d-f0fae672bc88 | ROONEY07/DS-PHI | DS-PH/LinkList Practise 6.5/Array representation/check_sort_02.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cout << "Enter the size of array: ";
cin >> n;
int a[n];
cout << "Enter the array: ";
for (int i = 0; i < n; i++) {
cin >> a[i];
}
// Check if array is sorted in ascending order
bool isAscending = true;
... | ALGO | 0.999913 | 5.362321 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-11-18T19:40: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": "e85df63c885... |
a2229c52-bfce-4425-bdb7-0a32e5b0fdde | pritamnikam/leetcode-daily-challenge | 2022/december/Maximum Difference Between Node and Ancestor.cpp | /*
1026. Maximum Difference Between Node and Ancestor
https://leetcode.com/problems/maximum-difference-between-node-and-ancestor/
Given the root of a binary tree, find the maximum value v for which there exist different nodes a and b where v = |a.val - b.val| and a is an ancestor of b.
A node a is an ancestor of b if... | ALGO | 0.999641 | 6.350434 | {
"github_metadata": {
"branch": "main",
"commit_count": 1070,
"repo_created_at": "2022-07-07T07:42:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c6125d0eb... |
12bd6f31-d862-426f-9969-efe3243f5680 | alps-jbnu/23ALPStudy | 2023-1/Intermediate/kimmi7574/Floyd/21940.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m, k;
int city[202];
int d[202][202];
const int INF = 1e9;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int u, v, t;
cin >> n >> m;
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= n; j++) {
if (i != j)
d[i][j] = INF;
}
... | ALGO | 0.99999 | 4.006129 | {
"github_metadata": {
"branch": "main",
"commit_count": 2930,
"repo_created_at": "2023-02-03T06:11:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 12,
"forks": 59,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "68a71899... |
45d3907c-60ce-4342-9d0e-0af60d44f8ba | quantau/Competitive-Programming | AnthemofBerland.cpp | #include <bits/stdc++.h>
#define sz(x) x.size()
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define nl "\n";
#define dbg(i) cout << "HERE " << i << endl;
#define var(x, y, z) cout << x << " " << y << " " << z << endl;
#define ll long long int
#define pii pair<ll, ll>
#define pb push_back
#def... | ALGO | 0.999985 | 4.040545 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2021-12-08T16:26:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7866745dc7c... |
e43ac3d1-5833-415f-afee-b0851ba7e920 | ishandutta2007/codeforces-l | ljc00118/normal/1534/F2.cpp | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define per(i, a, b) for (int i = a; i >= b; i--)
using namespace std;
typedef unsigned long long ull;
typedef pair <int, int> pii;
typedef long long ll;
template <typename T>
inline void read(T &f) {
f = 0; T fu = 1; char c = getchar();
... | ALGO | 0.999892 | 3.676465 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17: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": "5d695d874a02... |
235a77fe-020d-45a1-abaa-4d34d1d4853f | eowjd0512/BoW_WxBS | src/BoWbackup.cpp | #pragma once
#include "BoW.hpp"
#include "iindex.hpp"
#include <iostream>
#include <fstream>
#include "cv.hpp"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "./thirdParty/vlfeat/src/generic-driver.h"
#include "./thirdParty/vlfeat/vl/generic.h"
#include "./thirdParty/vlfeat/vl/sift.h"
... | ALGO | 0.999235 | 4.850541 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2018-04-16T04:15:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1fd347e33... |
d93bcdd6-8966-4c50-9474-e18696bc0e29 | Doebe/workplace | Codeforces/Kattis-1/E/srcE.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAX_INT = std::numeric_limits<int>::max();
const int MIN_INT = std::numeric_limits<int>::min();
const int INF = 1000000000;
const int NEG_INF = -1000000000;
#define max(a,b)(a>b?a:b)
#define min(a,b)(a<b?a:b)
#define MEM(arr,val)memset(arr,val, sizeof arr)
#defi... | ALGO | 0.99999 | 3.634383 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-01-25T19:03:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9efe380104... |
d5b4acf7-7555-4b7e-912b-ed6c4b16e05d | qrtc/webrtc.third_party | WebKit/Source/platform/scheduler/base/queueing_time_estimator.cc | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "platform/scheduler/base/queueing_time_estimator.h"
#include "base/memory/ptr_util.h"
#include <algorithm>
namespace blink {
namespace schedul... | ALGO | 0.980443 | 7.760659 | {
"github_metadata": {
"branch": "master",
"commit_count": 46897,
"repo_created_at": "2020-12-07T07:57:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 5,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "58867da... |
b4a48907-2c55-4da7-a36b-5908645c7d2f | JazibEqbal/CPP_OOPS | Questions/7.cpp | #include<bits/stdc++.h>
using namespace std;
void accept(int arr[30][30]){
for(int i=0;i<3;i++){
for(int j=0;j<3;j++){
cin>>arr[i][j];
}
}
}
void transpose(int a[30][30]){
for(int i=0;i<3;i++){
for(int j=i;j<3;j++){
int temp;
temp= a[i][j];
... | ALGO | 0.997627 | 4.322891 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2023-02-02T16:34: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": "f59a7816c... |
1beb99be-e4f1-4f13-a984-9abce444feeb | Gouderg/fractal-simulation | src/main.cpp | #include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <iostream>
#include <vector>
#include "../include/pvector.h"
#include "../include/fractal.h"
#include "../include/kochline.h"
using namespace std;
void initChoice(int &id, int &option);
int main(int argc, char const *argv[]) {
int id = 0, option = 0... | TOOL | 0.955196 | 4.160514 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-07-14T14:41: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": "20ff0a338c... |
8adc3f68-4726-4a78-9dc2-e1615a77ae24 | z3rxy/TicTacToe | TicTacToe.cpp | #include <iostream>
#include <vector>
#include <conio.h>
using namespace std;
vector<vector<char>> grid = { {'1', '2', '3'}
, {'4', '5', '6'}
, {'7', '8', '9'} }; //cells and their numbers
void drawGrid() { //this function draws the markup for tic-tac-toe
int indexX, indexY = 0;
for (int i = 0; i < ... | ALGO | 0.997749 | 4.200037 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-10-16T22:31:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f2ad2cb4d3a2... |
2d22ce46-d354-44e5-bfd7-42503cf30e13 | Tudor67/Competitive-Programming | LeetCode/Problems/Algorithms/#423_ReconstructOriginalDigitsFromEnglish_sol2_counter_O(N)_time_O(1)_extra_space_12ms_9.4MB.cpp | class Solution {
private:
vector<int> getCharCount(const string& S){
vector<int> count(26, 0);
for(char c: S){
count[c - 'a'] += 1;
}
return count;
}
bool contains(vector<int>& countA, vector<int>& countB){
// return true if countA contains countB
... | ALGO | 0.999748 | 5.441301 | {
"github_metadata": {
"branch": "master",
"commit_count": 615,
"repo_created_at": "2020-02-27T19:56:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fe1c1821... |
4a345811-363c-4d07-be43-043762edd8bb | Nheko-Reborn/mtxclient | include/mtx/common.hpp | #pragma once
#if __has_include(<nlohmann/json_fwd.hpp>)
#include <nlohmann/json_fwd.hpp>
#else
#include <nlohmann/json.hpp>
#endif
#include <map>
#include <string>
#include <vector>
/// @file
/// @brief Common types used by the crypto related endpoints. Common types used by room directory
/// endpoints.
namespace m... | TOOL | 0.905309 | 5.47303 | {
"github_metadata": {
"branch": "master",
"commit_count": 954,
"repo_created_at": "2019-01-16T00:59:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 39,
"forks": 28,
"issues": 12,
"pull_requests": 0
},
"file_meta": {
"content_id": "c00ec8... |
f7fcd6ab-5aeb-4c96-b28c-df2c89547974 | vkotaru/kite_ros | kite_control/include/kite_control/quadrotor_tlee_control.h | //
// Created by kotaru on 2/11/23.
//
#ifndef KITE_ROS_KITE_CONTROL_QUADROTOR_TLEE_CONTROL_H_
#define KITE_ROS_KITE_CONTROL_QUADROTOR_TLEE_CONTROL_H_
#include "kite_control/math.h"
#include <eigen3/Eigen/Dense>
namespace kite_ros::control {
/**
* Implements Geometric control on SO(3) from
* Lee, Taeyoung, <NAME>... | ALGO | 0.988041 | 7.02926 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2023-02-11T10:33:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9867702a0... |
48888987-5b59-48c2-986c-cc095afc4f8b | NyaanNyaan/library | matrix/polynomial-matrix-prefix-prod.hpp | #pragma once
#include "../fps/formal-power-series.hpp"
#include "../fps/sample-point-shift.hpp"
#include "matrix.hpp"
// return m(k-1) * m(k-2) * ... * m(1) * m(0)
template <typename mint>
Matrix<mint> polynomial_matrix_prod(Matrix<FormalPowerSeries<mint>> &m,
long long k) {
usin... | ALGO | 0.999712 | 5.62338 | {
"github_metadata": {
"branch": "master",
"commit_count": 1700,
"repo_created_at": "2020-04-11T09:13:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 239,
"forks": 20,
"issues": 10,
"pull_requests": 1
},
"file_meta": {
"content_id": "9e7... |
42fcc103-b06b-45a7-920e-3c38a6d6f434 | myozinaung/CGMRES-Autopilot-Latest | include/cgmres/ms_cgmres_with_input_saturation.hpp | // The multiple shooting based continuation GMRES (C/GMRES) method, a fast
// algorithm of nonlinear model predictive control (NMPC). This program is
// witten with reference to "<NAME> A continuation/GMRES method for fast
// computation of nonlinear receding horizon control, Automatica, Vol. 40,
// No. 4, pp. 563-... | ALGO | 0.998564 | 6.707973 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-02-07T08:41: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": "c35517eaac... |
4df9071a-9327-486c-931e-44f79085721c | yunuspektass/My-data-structures-and-algorithms-studies-with-CPP | Yıgın(Stack)/Yıgın(Stack)/main.cpp | /*
statik
dinamik
LİFO last in first out
son giren ilk çıkar
push metodu = yığına veri ekler
pop metodu = veri çıkartır yığından
top metodu = en üst değeri veir bize
*/
#define SIZE 10 // dizinin kapasitesini belirledik
// 10 adet veri alabilir
#include <iostream>
using namespace std;
struct stack... | TOOL | 0.994975 | 3.947704 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-03-03T11:59: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": "7e48ce937cb5... |
64a05bac-4ebf-4f99-bba1-035894943c99 | ayushsaha1018/CrackYourPlacement | AllNodesDistanceKinBinaryTree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
vector<int> distanceK(TreeNode* root, TreeNode* target, int k) {
unordered_map<int, Tre... | ALGO | 0.999992 | 5.985016 | {
"github_metadata": {
"branch": "main",
"commit_count": 152,
"repo_created_at": "2024-07-15T11:16: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": "395156f385... |
d2f36954-ebb3-4455-a6ca-d2defe70ed3d | Bellac12345/CryptologyPractice1 | tpose.cpp | /*
CIS4362 - Intro to Cryptology
Ex02 - tpose
<NAME>
09/23/2020
*/
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <cassert>
#include <cstring>
#include <fstream>
#include <iterator>
#include <algorithm>
using namespace std;
int main(int argc, char**... | ALGO | 0.995236 | 4.768502 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-03-02T21:31:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7444bdd997... |
23fa7610-42c1-4e06-8338-29e798530ef9 | ggml-org/llama.cpp | tools/mtmd/mtmd-helper.cpp | // fix problem with std::min and std::max
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
# define NOMINMAX
#endif
#include <windows.h>
#endif
#include "mtmd.h"
#include "mtmd-helper.h"
#include "llama.h"
#include <algorithm>
#include <cinttypes>
#include <vector>
//#define MTMD_AUDIO_DEBUG
#defi... | DATA | 0.966484 | 7.020123 | {
"github_metadata": {
"branch": "master",
"commit_count": 5949,
"repo_created_at": "2023-03-10T18:58:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 83269,
"forks": 12407,
"issues": 276,
"pull_requests": 475
},
"file_meta": {
"content_id... |
0d4ae668-df1f-42e4-9a76-9b1179d6bff6 | DushyantBhardwaj07/CodeForces-DSA | B_Box_Fitting.cpp | #include<bits/stdc++.h>
using namespace std;
#define yes "YES"
#define no "NO"
#define ll long long
#define mod 1000000007
void display(vector<ll>v){ for(ll i=0;i<v.size();i++) cout<<v[i]<<' ';cout<<endl;}
void display2d(vector<vector<ll>> v){for(ll i=0;i<v.size();i++){for(ll j=0;j<v[i].size();j++){cout<<v[i][j]<<' ';}... | ALGO | 0.999975 | 4.060151 | {
"github_metadata": {
"branch": "master",
"commit_count": 413,
"repo_created_at": "2024-07-10T19:42:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c784fbc8... |
42a7d25c-4793-45fa-9dc4-0b2b146f8423 | Lee-HyeongSeok/SW_expert_examples | test/Solved_Gravity/solved_gravity.cpp | #include <iostream>
#include <vector>
using namespace std;
vector<vector<int>> map;
vector<int> input_vector;
int N, M; // 방의 가로 : N, 방의 세로 : M
void init(int N, int M) {
for (int i = 0; i < M; i++) {
for (int j = 0; j < N; j++) {
input_vector.push_back(0);
}
map.push_back(input_vector);
}
}
int Result() ... | ALGO | 0.999956 | 4.664541 | {
"github_metadata": {
"branch": "main",
"commit_count": 120,
"repo_created_at": "2020-04-28T17:48:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2021883d0... |
931cdfd8-8e96-40a7-a403-3c890741680b | AK-Github-0/Data-Structure-Course | CS221_Assignment3_2020024.cpp | #include <iostream>
#include <bits/stdc++.h>
#include <ctime>
#include <algorithm>
#include <vector>
using namespace std;
class Sorting_Arrays
{
public:
void Input_Array()
{
int Length;
cout<<"Enter the length of array";
cin>>Length;
int array[Length];
for (int i = 0; i < Length; i++)
{
array[i] = ra... | ALGO | 0.999069 | 4.444908 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2022-11-16T11:21: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": "132d4f25a6f... |
93a23673-7f7d-4a07-a566-81acaf6f346a | QuickSorting/Codeforces | Educational 102/D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
while(t--){
int n, m;
cin >> n >> m;
string s;
cin >> s;
vector<int> p(n + 2);
p... | ALGO | 0.99995 | 3.956079 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-12-13T18:02: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": "b71d5635dba9... |
bd7f06fc-8855-4797-826d-7fb9eb5e6646 | JunBinLiang/Road-To-1900 | Leetcode/Constructive/3348-Smallest Divisible Digit Product II(H).cpp | class Solution {
public:
string smallestNumber(string s, long long val) {
vector<int> vec = get(val);
if(vec.size() == 0) return "-1";
vector<int> prefix(4);
for(int i = 0; i < s.size(); i++) {
vector<int> temp = get(s[i] - '0');
add(prefix, temp);
... | ALGO | 0.999952 | 4.61044 | {
"github_metadata": {
"branch": "main",
"commit_count": 924,
"repo_created_at": "2024-09-25T02:23: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": "2c78c1c34b... |
d623c099-09d8-4449-a895-a3424779653f | Makgalemela/Checkers-Game | checkers.h | #ifndef CHECKERS_H
#define CHECKERS_H
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <cstdlib>
#include <time.h>
#include <string>
using namespace std;
/** \brief The struct is just a point on the board, i.e a square on the board, and it represent all
charecteristics ... | ALGO | 0.915776 | 3.204237 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-12-17T23:31:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "b0d9293d9a... |
6dbef3db-cd10-4823-b7e6-bae70070f520 | emerencia/topcoder | SRMs/N-Z/StringPath_single_string.cpp | #include <string>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <cmath>
#include <utility>
#include <climits>
#include <limits>
#include <cstring>
#include <numeric>
using namespace std;
typedef pair<int,int> PII;
typedef long long ... | ALGO | 0.999995 | 4.552408 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-12-03T23:20: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": "8c95728174ac... |
eea05dde-84e6-4a47-94c4-2c52a4408c4a | deepakantony/competitive_programming | code_chef/2017_february_challenge/CHEFAPAR/chef_and_his_apt_dues.cxx | /*
Problem: Chef and his apartment dues
Link: CHEFAPAR
Author: <NAME> - "deebee" "drunkbeast" "dAbeAst"
Solution: simple!
*/
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cassert>
#include <ctime>
#include <vector>
#include <algorithm>
#include <utility>
#include <limits>
#include <iostream>
... | ALGO | 0.996986 | 3.811226 | {
"github_metadata": {
"branch": "master",
"commit_count": 785,
"repo_created_at": "2011-12-16T19:45:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4bced96... |
08ece9cb-45d6-4d51-8076-2765b43f7fc2 | rohakdebnath/ATCODER-solutions | unfairgame.cpp | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define UNSYNC ios::sync_with_stdio(false); cin.tie(nullptr);
#define all(x) x.begin(), x.end()
#define rep(i, ini, x) for (int i = ini; i < x; ++i)
#define per(i, fin, x) for (int i = fin; i >= x; --i)
int dp[201][201][201];
void prec()
{
rep... | ALGO | 0.999944 | 4.543642 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-07-17T12:08: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": "71ad14d885... |
22b6509a-20c8-4d3d-8c64-8546088cbd5a | snehaM2210/Programming-Practices | Cpp_codes/Problems solved/BinaryTrees/LevelWiseLL.cpp | // Level wise linkedlist
// Given a binary tree, write code to create a separate linked list for each level. You need to return the array which contains head of each level linked list.
// Input format :
// The first line of input contains data of the nodes of the tree in level order form. The data of the nodes of the t... | ALGO | 0.999981 | 5.363873 | {
"github_metadata": {
"branch": "main",
"commit_count": 462,
"repo_created_at": "2020-10-19T06:02: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": "499d7a4405... |
a68ce922-bed4-4e74-8496-846d719749ce | ParkhiyaParth/CPP-Programming | CodeForces/CP-31 1100/C_Yarik_and_Array.cpp | #include <iostream>
#include <bits/stdc++.h>
#define ll long long
#define MOD 1000000007
using namespace std;
void solve()
{
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++)
{
cin >> a[i];
}
int sum = a[0];
int ans = a[0];
int mn = min(a[0], 0);
for (int i =... | ALGO | 0.999858 | 4.627127 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-12-27T06:44:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e9b7d6692bc... |
42e23b23-9936-4d55-a3c6-124a10ff8728 | MietLabsStorage/MIET_ArchVS_labs | lab6/task4/main.cpp | #include <iostream>
using namespace std;
int main()
{
int i;
const double epsilon = 0.001;
double sum;
const double n1=1;
const double n2=-2;
double current;
double tempCurrent;
cout << "Sum of series" << endl;
asm
(
"xor %%edx, %%edx\n" //i = 0
"fldl %[N2]\n... | ALGO | 0.999752 | 3.419226 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2020-09-13T12:07:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f06400a957... |
e952f90e-ca20-467f-b679-78196f567937 | vincentadufour/CS3210-Principles-of-Programming-Languages | Labs/libraryLab3_1.cpp | /*
Student: <NAME>
Professor: Dr. <NAME>
Assignment: Lab 3.1
Date: 13.04.2025
Time Taken: 7 hours ish
*/
#include <iostream>
#include <vector>
#include <string>
#include <unordered_map>
class Book
{
private:
std::string title;
std::string author;
std::string isbn;
bool ... | TOOL | 0.934602 | 5.859327 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-01-22T22:17: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": "5b84f66c71d... |
4b1c2d1d-eea4-460c-993d-f6131e8d6e31 | ezhillragesh/college_dsa_codes | Graphs/tempCodeRunnerFile.cpp | #include <bits/stdc++.h>
using namespace std;
//21BBS0100
class edge{
public:
int source;
int dest;
int weight;
};
bool compare(edge e1,edge e2){
return e1.weight<e2.weight;//sort increase order
}
int findparent(int v,int *parent){
if(parent[v]==v){
return v;
}
ret... | ALGO | 0.999985 | 4.76105 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-11-14T00:30: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": "191314bbbf27... |
42533985-110b-4804-9cfb-7efe269428d5 | iilnar/algo | year_2/lab07/B/code.cpp | #include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#define FILENAME "search2"
using namespace std;
vector <int> p_function (string s) {
vector <int> p(s.size());
for (int i = 1; i < s.size(); i++) {
p[i] = p[i - 1];
while (p[i] > 0 && s[i] != s[p[i]]) {
p[i]... | ALGO | 0.999966 | 3.929578 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-05-28T19:46: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": "e0d971bd4a... |
c52a5152-7d6c-4d15-92f5-367f849f178f | OpenTTD/OpenTTD | src/core/math_func.cpp | /*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the im... | ALGO | 0.99455 | 6.328119 | {
"github_metadata": {
"branch": "master",
"commit_count": 31538,
"repo_created_at": "2018-04-06T18:06:22.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7006,
"forks": 1003,
"issues": 179,
"pull_requests": 138
},
"file_meta": {
"content_id"... |
51ea94b3-aaa3-4953-a1fa-710400db9125 | y761823/ACM-code | hihoCoder/p1148.cpp | #include <cstdio>
#include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
string month[] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November" , "December"};
int T, n;
int get_month(string s) {
return find(month, month + 12, s) - m... | ALGO | 0.999924 | 4.21309 | {
"github_metadata": {
"branch": "master",
"commit_count": 598,
"repo_created_at": "2015-05-11T15:21: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": "f48fba44... |
5bc51be7-b246-4982-9fdc-0eb4e318ce87 | DDor-H/leetcode_cpp | code/动态规划/leetcode_0213.cpp | class Solution {
public:
int rob(vector<int>& nums) {
int len = nums.size();
if (len == 1)
return nums[0];
if (len == 2)
return max(nums[0], nums[1]);
return max(rotateRob(nums, 0, len - 2), rotateRob(nums, 1, len - 1));
}
int rotateRob(vector<int>& n... | ALGO | 0.999973 | 5.512176 | {
"github_metadata": {
"branch": "main",
"commit_count": 93,
"repo_created_at": "2021-08-22T05:24: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": "bb647d52fc8... |
9943730a-7e56-4681-9fef-27c896ef172d | tkthegreat99/Coding_Test_Practice | 백준/Gold/2473. 세 용액/세 용액.cc | #include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <queue>
#include <string>
#include <stack>
#include <map>
#include <set>
#include <list>
#include <unordered_set>
#include <unordered_map>
#include <tuple>
#include <limits.h>
#include <math.h>
#define int long long
#define fastio ci... | ALGO | 0.999985 | 3.437913 | {
"github_metadata": {
"branch": "main",
"commit_count": 428,
"repo_created_at": "2020-10-26T03:40:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "08004b1bba... |
5d3afec2-0eda-40c5-b9e7-b2829e61c24e | AIS-Bonn/stillleben | contrib/v-hacd/src/FloatMath.inl | // a set of routines that let you do common 3d math
// operations without any vector, matrix, or quaternion
// classes or templates.
//
// a vector (or point) is a 'float *' to 3 floating point numbers.
// a matrix is a 'float *' to an array of 16 floating point numbers representing a 4x4 transformation matrix compatib... | ALGO | 0.996538 | 5.349251 | {
"github_metadata": {
"branch": "master",
"commit_count": 679,
"repo_created_at": "2020-03-10T23:55:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 62,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "46d3b5ad... |
64f738d2-3029-4478-b015-791a77405f41 | Najmuzzaman/Codechef | codechef165/c.cpp | #include <bits/stdc++.h>
using namespace std;
bool possible(const vector<int>& a, const string& s, const string& p, const string& q)
{
if (a.empty())
return true;
int l = a[0], r = a.back();
string ss = s.substr(l, r - l + 1);
reverse(ss.begin(), ss.end());
string s1 = s.substr(0, l) + ss ... | ALGO | 0.999972 | 4.665306 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2015-09-20T06:34:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae76da3656... |
849fb27c-5612-4371-975b-843d2545cd6b | Suyash1989/galerkin-and-fem | Galerkin_method/calculus/D1Integrate.cpp | #include "stdafx.h"
#include "D1Integrate.h"
#include "finite_element/D1Element.h"
#include "calculus/integrate.h"
#include "calculus/Derivative.h"
using namespace std;
double D1Integrate::Integrate_Ni_Nj(const shared_ptr<D1Element>& N_i, const shared_ptr<D1Element>& N_j)
{
auto shared_interval = N_i->get_share... | ALGO | 0.954979 | 4.843754 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2016-04-25T01:34:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2813f6e2... |
1fb7fd72-6ac1-46f0-9f5d-d090927f4dee | rHermes/contests | dmoj/aplusb2-large-base.cpp | #include <cstdio>
#include <cstdint>
#include <algorithm>
#include <limits>
#include <string_view>
#include <vector>
#include <stdexcept>
class BigInt {
private:
using DT = std::uint64_t;
bool negative_{false};
std::vector<DT> digits_;
void zero_out() {
digits_.resize(1);
digits_[0] = 0;
negati... | ALGO | 0.999642 | 6.13373 | {
"github_metadata": {
"branch": "master",
"commit_count": 416,
"repo_created_at": "2018-03-10T19:49:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0da39f1d... |
651f260a-1978-4bbb-a788-f75e762db0f6 | Yeswanthram-21/Internship-activity | Day5/p23.cpp | /*
*Internship activity - <Day 5>
Project: Rapid Vision Measuring System.
Task: <C++ activity>
Compiler:Windows 10
IDE:VS Code
Author:<NAME>
Q3.C++ program to find the value of ceil,floor,fmod,trunc.
*/
#include <iostream>
#include <cmath> // For ceil(), floor(), fmod(), trunc()
using namespace std;
int... | ALGO | 0.994417 | 4.651705 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2024-11-25T11:02: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": "4818c6f72b7... |
d347376c-1732-4694-9a84-d2090c57d717 | najwa-shahbaz-920/DSA | arrayAllOperation.cpp | #include<iostream>
using namespace std;
int arr[10] = {10, 20, 30, 40, 50}; // Initialize the array with some elements
int size = 5; // Current size of the array
void addAtBeginning(int value) {
if(size == 10) {
cout << "Array is full, cannot add element." << endl;
return;
}
for(int i = ... | TOOL | 0.999147 | 6.027626 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-09-21T13:06: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": "ffc9f7ecd59b... |
48baeb10-2069-49bd-87a2-73dbe0f52c8d | cctbx/cctbx_project | scitbx/matrix/eigensystem.h | /// Eigenvalues and eigenvectors computation
#ifndef SCITBX_MATRIX_EIGENSYSTEM_H
#define SCITBX_MATRIX_EIGENSYSTEM_H
#include <scitbx/array_family/accessors/mat_grid.h>
#include <scitbx/array_family/versa.h>
#include <scitbx/array_family/shared.h>
#include <scitbx/array_family/accessors/c_grid.h>
#include <scitbx/arr... | ALGO | 0.999829 | 6.407578 | {
"github_metadata": {
"branch": "master",
"commit_count": 38660,
"repo_created_at": "2015-07-22T13:36:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 256,
"forks": 121,
"issues": 120,
"pull_requests": 31
},
"file_meta": {
"content_id": "... |
a65e4553-bbff-4db8-ae9c-eaa543bdc373 | xxvms/ComparisonsAndArithmetics | main.cpp | #include <iostream>
bool IsPrime(int x);
int main() {
int i =0;
i += 2; // 2
i *= 3; // 6
i -= 2; // 4
i /= 4; // 1
std::cout << " \n";
int j = i++; //j 1, i 2
j = ++i; // j 3, i 3
j = i--; // j 3, i 2
j = --i; // j 1, i 1
i = 2;
j = 0;
while (i <101){
j ... | ALGO | 0.999661 | 4.233802 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-04-11T10:44:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2ccb1b2ef4... |
49028e55-c7a5-4459-ac79-11e6afc35b56 | ChaomengOrion/CompetitiveSave | Codeforces/CodeTON Round 9 (Div. 1 + Div. 2, Rated, Prizes!)/C_2_Shohag_Loves_XOR_Hard_Version.cpp | #include <bits/stdc++.h>
using i64 = long long;
#define LOG(...) //std::cerr << "Line[" << __LINE__ << "]: " << __VA_ARGS__ << std::endl;
#define LOGV(_vec, _size) std::cerr << #_vec << " = " << '['; for (int _i = 0; _i < (_size); _i++) { std::cerr << (_vec)[_i]; if (_i != (_size) - 1) std::cerr << ", "; } std::cerr ... | ALGO | 0.999938 | 4.823965 | {
"github_metadata": {
"branch": "main",
"commit_count": 101,
"repo_created_at": "2024-09-11T05:25:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a173378b7f... |
c16a40b9-8c70-4715-a5c4-bc1b7fb14d19 | jtrelawney/mosaic | threads/7_queue_mpmc_cond_vars_old_1.cpp | // mutex example
#include <iostream> // std::cout
#include <thread> // std::thread
#include <mutex> // std::mutex
#include <condition_variable>
#include <chrono>
#include <unistd.h> // usleep
#include <queue> // queue
std::time_t get_time(){
// this seems to give millis
/... | TOOL | 0.91398 | 4.100155 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-04-02T18:13: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": "fec5979f8e... |
dca3847a-d6ab-4f45-a4d5-ebb0522345fb | crazyxy/UVA | 124 - Following Orders.cpp | #include <iostream>
#include <vector>
#include <string>
#include <map>
#include <algorithm>
#include <cstring>
using namespace std;
const int maxn = 25;
map<char, int> m;
char aset[ maxn ];
int g[maxn][maxn];
int deg[maxn];
int vis[maxn];
vector<string> res;
void DFS(int src, int n, string str){
if(str.length() == n... | ALGO | 0.999985 | 3.856228 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2015-04-25T01:57:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "079d881af... |
3aaa3a5e-e769-410b-b097-a04e0877a47e | JoeyOhman/ConstraintProgramming | squarePacking/no-overlap.cpp | /*
* Main author:
* <NAME> <<EMAIL>>
*
* Copyright:
* <NAME>, 2009
*
* 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 limitatio... | ALGO | 0.999521 | 7.463391 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-05-21T13:47: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": "13b8862bd9... |
f983693b-b85c-4285-bd2c-05136d35dddc | zhangganlin/Algolab-2021 | week9/real_estate/real_estate.cpp | // ALGOLAB BGL Tutorial 3
// Code demonstrating
// - MinCostMaxFlow with arbitrary edge costs using cycle_canceling
// - MinCostMaxFlow with non-negative edge costs using successive_shortest_path_nonnegative_weights
// Includes
// ========
#include <iostream>
// BGL includes
#include <boost/graph/adjacency_list.hpp>
... | ALGO | 0.999936 | 4.2488 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-02-12T15:27: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": "29e1b4f633... |
2837984b-1a1c-4740-b4cd-e8e34cf88fe7 | finnsaile/AOC21 | Day 09/Task1.cpp | #include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main()
{
ifstream file("log.txt");
string in;
vector<vector<int32_t>> matrix;
int32_t sum = 0;
while (getline(file, in))
{
matrix.push_back(vector<int32_t>());
for(auto& ch: in)
{
... | ALGO | 0.99933 | 3.923779 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2021-12-05T17:11:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fcd569655ff... |
b6aef12e-dbf1-4513-b73e-d5f83f2b89d5 | alan0823666/leetcode | 18. 4Sum.cpp | class Solution {
public:
vector<vector<int>> fourSum(vector<int>& nums, int target) {
using namespace std;
sort(nums.begin(), nums.end());
int N = nums.size();
vector<vector<int>> ans;
for(int n1 = 0; n1 < N-3; n1++) {
for(int n2 = ... | ALGO | 0.999991 | 5.839928 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-11-17T13:08: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": "cb76b8d211d4... |
1f811af4-8374-415b-9744-fbaf7af23af6 | PrashamJ94/GI-Code-Transpilation | LLM-Translations/GPT-4/avatar/Python/C++/codeforces_327_A.c++ | #include <bits/stdc++.h>
using namespace std;
vector<int> find(const string& s, char ch) {
vector<int> indices;
const int n = s.size();
for(int i = 0; i < n; i++) {
if(s[i] == ch) {
indices.push_back(i);
}
}
return indices;
}
int main() {
int n;
cin >> n;
st... | ALGO | 0.999978 | 4.059201 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-05-01T22:27: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": "d5a7704f0d6b... |
2acac6ac-463f-4d54-b0b3-0c9b68487894 | AlexDevyatov/ACM-Contests-Data | NCPC/2015/ncpc2015/goblingardenguards/submissions/accepted/lukas-nobsearch-vector.cpp | //Solution by lukasP (<NAME>)
#include <iostream>
#include <vector>
#include <set>
#include <list>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cstdio>
using namespace std;
#define rep(i,a,b) for(__typeof(b) i=a; i<(b); ++i)
const int length = 10001;
double pytag(double r, double x)
{
r... | ALGO | 0.999808 | 4.08555 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-12-20T16:03: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": "7f60bbd2e4... |
3c8c31ee-8e70-46b9-805f-4e0570eb09bd | chakravartiavinit/Practice | Practice2/leetcode_stack1.cpp | #include <bits/stdc++.h>
using namespace std;
bool backspaceCompare(string S, string T)
{
stack<char> s, t;
for (int i = 0; i < S.length(); i++)
{
if (!s.empty() && S[i] == '#')
{
s.pop();
}
else if (S[i] != '#')
{
s.push(S[i]);
}
}... | ALGO | 0.999891 | 5.201562 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2021-10-02T19: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": "a46f8e669ab... |
44fb0410-2420-435c-951c-0be8ddc3bb89 | ADITYA6584/Striver-A-Z-Sheet | Step-1/AddBinary.cpp | /*
This is a simple but little tricky question
Approch:
This is important sum = carray
1. Iterate in opposite order
2. Add it .
3. If the sum is more than 1 then carray =1
4. else add to string and then sum =0;
*/
class Solution {
public:
string addBinary(string a, string b)
{
int carry= 0;
in... | ALGO | 0.999998 | 5.675476 | {
"github_metadata": {
"branch": "Striver",
"commit_count": 37,
"repo_created_at": "2024-09-02T19:32: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": "fd9aebf1... |
60ee2b98-6e73-4ddc-8fd6-3820e5e06ac0 | karanghai/cs225Labs | Labs/lab_reduce/pnganalysis.h | /**
* @file pnganalysis.h
* Declaration for functions that perform analysis on PNG images.
*
* @author <NAME>
* @date Spring 2012
*/
#ifndef _PNGANALYSIS_H_
#define _PNGANALYSIS_H_
#include <map>
#include <omp.h>
#include <algorithm>
#include <cassert>
#include <vector>
#include "compare.h"
#include "png.h"
#in... | TOOL | 0.986657 | 6.465528 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2014-02-08T10:57:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "6903a23542... |
457a9ca9-c086-4216-8028-0614ac4bc6c7 | yohan020/baekjoon | baekjoon/7576.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
int M, N;
int dir[4][2] = { {-1,0},{1,0},{0,-1},{0,1} };
queue<pair<int, int>> q;
void bfs(int x, int y, vector<vector<int>>& tomato) {
while (!q.empty()) {
int temp_x = q.front().first;
int temp_y = q.front().second;
q.pop();
for ... | ALGO | 0.999984 | 3.953396 | {
"github_metadata": {
"branch": "master",
"commit_count": 129,
"repo_created_at": "2024-11-09T07: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": "59abd245... |
5c56fc25-5b42-452d-82f2-833a18881721 | xtaci/algorithms | include/palindrome.h | /*******************************************************************************
* DANIEL'S ALGORITHM IMPLEMENTAIONS
*
* /\ | _ _ ._ o _|_ |_ ._ _ _
* /--\ | (_| (_) | | |_ | | | | | _>
* _|
*
* PALINDROMES
*
* WORDS LIKE:
* RACECAR DEED LEVEL PIP
* ROTOR CIVIC PO... | ALGO | 0.995493 | 4.654806 | {
"github_metadata": {
"branch": "master",
"commit_count": 515,
"repo_created_at": "2013-04-09T14:17:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5374,
"forks": 1522,
"issues": 7,
"pull_requests": 97
},
"file_meta": {
"content_id": "e... |
de462835-e56c-4ebb-acf6-9e62f15b1602 | srl-ethz/3d-soft-trunk | src/Models/Lagrange.cpp | #include "3d-soft-trunk/Models/Lagrange.h"
Lagrange::Lagrange(const SoftTrunkParameters &st_params): st_params_(st_params)
{
assert(st_params_.is_finalized());
}
void Lagrange::A_update(VectorXd q)
{
double A_in[16];
double t2 = std::cos(q[0]);
double t3 = std::cos(q[2]);
double t4 = std::sin(q[0]);
dou... | ALGO | 0.998841 | 5.060504 | {
"github_metadata": {
"branch": "master",
"commit_count": 788,
"repo_created_at": "2022-03-20T13:04:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "7cf2ef5a9... |
1f489da7-a731-43d5-b49d-02919d1c6af8 | ckdlscjs/AlgorithmRepo | 백준/Silver/2644. 촌수계산/촌수계산.cc | #include <bits/stdc++.h>
using namespace std;
int N, A, B, M, x, y, depth[105], parent[105], res;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
std::cin >> N >> A >> B >> M;
for(int m = 0; m < M; m++)
{
std::cin >> x >> y;
depth[y] += depth[x] + 1;
parent[y] = x;
... | ALGO | 0.999984 | 3.589433 | {
"github_metadata": {
"branch": "main",
"commit_count": 1272,
"repo_created_at": "2024-01-10T13:32: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": "e382397d6... |
5318abb5-0a4a-4f98-a211-175f702e0cb6 | OpenFOAM/OpenFOAM-6 | applications/solvers/combustion/chemFoam/thermoTypeFunctions.H | /*---------------------------------------------------------------------------*\
========= |
\\ / <NAME> | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ ... | ALGO | 0.9879 | 4.307275 | {
"github_metadata": {
"branch": "master",
"commit_count": 3440,
"repo_created_at": "2018-07-10T07:59:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 113,
"forks": 127,
"issues": 3,
"pull_requests": 2
},
"file_meta": {
"content_id": "520... |
9c1766ae-c95b-4ae8-88dd-786304db022a | rutgers-db/EntityBlockingBySimilarityJoins | cpp/group/group.cc | /*
* author: <NAME>
* contact: <EMAIL>
*/
#include "group/group.h"
std::unordered_map<std::string, std::vector<double>> Group::saveNegEmbeddings(const std::vector<std::string> &docs, const DocEmbeddings &vecs)
{
std::unordered_map<std::string, std::vector<double>> doc2Vec;
for(size_t i = 0; i < docs.size()... | ALGO | 0.97063 | 5.998991 | {
"github_metadata": {
"branch": "main",
"commit_count": 71,
"repo_created_at": "2024-10-31T01:44:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "eee6e7275d31... |
c6a33c02-a497-43be-a44c-b6556c80487a | akij22/FdP-B--UniPr | Pair/main.cpp | #include <iostream>
#include <vector>
using namespace std;
template<typename K, typename V>
class Pair {
private:
K key;
V value;
public:
Pair(K key, V value) {
this->key = key;
this->value = value;
}
K getKey() const {
return this->key;
}
V getValue() const {
... | TOOL | 0.977789 | 5.449199 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2025-03-11T20:00:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "80d856cfb62... |
90f610c0-c9f4-41b5-9c82-832f4d906492 | hprogq/algorithm | past/bint_multi.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <list>
using namespace std;
list<int> a;
vector<int> multi( vector<int>& a, int b ) {
vector<int> c;
int t = 0;
for ( int i = 0; i < a.size() || t; i++ ) {
if ( i < a.size() ) t = t + a[i] * b;
c.push_back( t % 10 );
... | ALGO | 0.999876 | 3.894157 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2023-12-15T02:35:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9da1c4a88ec... |
8a966a18-05e0-42af-b7b1-a311635ae424 | bobcristian/Detectie-degete-si-arduino | BackgroundSubstractor/ERDL.h | #pragma once
#include <opencv2\imgproc\imgproc.hpp>
#include <opencv2\highgui\highgui.hpp>
#include <opencv\highgui.h>
#include <stdlib.h>
#include <iostream>
using namespace cv;
using namespace std;
namespace ERDL
{
Mat src_img, erosion_img, dilation_img;
static int erosion_elem = 0;
static int erosion_size = 3... | TOOL | 0.95096 | 4.591205 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-03-13T08:11: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": "46e83f542f... |
c7432861-a2ea-4ca5-9e65-535f1170e2fc | noraabiakar/benchmarks | compare_avx512_div.cpp | #include <iostream>
#include <stdlib.h>
#include <time.h>
#include <chrono>
#include <vector>
#include <algorithm>
#include <numeric>
#include <sys/prctl.h>
#include <unistd.h>
#include <immintrin.h>
using cclock = std::chrono::high_resolution_clock;
inline void flop_0(int64_t size, double* data_a) // 2 flops - 8 by... | ALGO | 0.999401 | 4.416709 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-06-11T13:47: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": "aaad2ee42d... |
c1df8261-9b3c-48c3-ac07-874962364ec3 | william12ab/2D-ProcGen-Track-Tool | SFML_RuleBasedSystem/ImageProcessing.cpp | #include "ImageProcessing.h"
#include <ppl.h>
using namespace concurrency;
ImageProcessing::ImageProcessing() {
heightmap_ = nullptr;
heightmap_1 = nullptr;
heightmap_2 = nullptr;
heightmap_3 = nullptr;
heightmap_fbm_ = nullptr;
noise_heightmap_ = nullptr;
noise_heightmap_1 = nullptr;
noise_heightmap_2 = null... | ALGO | 0.991955 | 4.034167 | {
"github_metadata": {
"branch": "master",
"commit_count": 376,
"repo_created_at": "2021-10-29T14:23: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": "af0cce60... |
96a1e18f-7990-4e3a-9e8e-962a7df0af38 | IcebladeLabs/USACO-Practice-Solutions | Bronze/shellgame.cpp | #include <cstdio>
#include <iostream>
#include <array>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
freopen("shell.in", "r", stdin);
freopen("shell.out", "w", stdout);
array<int, 3> arr;
arr[0] = 0;
arr[1] = 1;
arr[2] = 2;
int count1, count2, count3;
count1 = c... | ALGO | 0.999896 | 3.997347 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2025-05-21T20:29:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5227d86506c... |
48416664-11b4-403b-8b60-9207bddb07c2 | palilo815/ps | baekjoon/13000/13309.cpp | #include <bits/stdc++.h>
using namespace std;
const int M = 2e5 + 1;
const string ans[2] = {"YES\n", "NO\n"};
vector<int> adj[M];
int N, t, par[M], sz[M], top[M], idx[M];
bool segT[M << 1];
void dfs(int u) {
sz[u] = 1;
for (int& v : adj[u]) {
dfs(v);
sz[u] += sz[v];
if (sz[v] > sz[adj... | ALGO | 0.999977 | 5.16304 | {
"github_metadata": {
"branch": "master",
"commit_count": 6725,
"repo_created_at": "2020-01-12T04:58:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "76e5154... |
9d0c6264-371a-41e8-8dd2-fe7116c82df6 | maxnoe/adventofcode2020 | include/aocmaxnoe2020/day14.h | #ifndef day14_H
#define day14_H
#include <aocmaxnoe2020/aocmaxnoe2020.h>
#include <vector>
#include <unordered_map>
#include <string_view>
#include <utility>
#include <memory>
namespace aocmaxnoe2020 { namespace day14 {
const int N_BITS = 36;
struct Mask {
uint64_t mask_zero = 0;
uint64_t mask_one = 0;
... | ALGO | 0.965136 | 5.606952 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2020-12-01T17: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": "9d120b89703... |
f2334c90-18ef-4802-999e-e34426e311e1 | valida-xyz/valida-compiler | libc/src/math/generic/logf.cpp | //===-- Single-precision log(x) function ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | ALGO | 0.991543 | 7.144907 | {
"github_metadata": {
"branch": "valida_backend",
"commit_count": 453884,
"repo_created_at": "2023-03-21T15:04:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 51,
"forks": 13,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id... |
3d4e7863-8a8e-47f5-b52b-9ee27dc14701 | SPQRTeam/spqr2023 | Src/Modules/BehaviorControl/Libraries/LibPassProvider.cpp | /**
* @file LibPassProvider.cpp
*
* See LibPass
*
* @author <NAME>
*/
#include "LibPassProvider.h"
MAKE_MODULE(LibPassProvider, behaviorControl);
void LibPassProvider::update(LibPass& libPass)
{
libPass.findPassingLine = [this](Vector2f target, std::vector<Vector2f> mates) -> Vector2f {
return findPassi... | TOOL | 0.946548 | 3.350212 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-10-15T20:25:19.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aaf494ae29116... |
f5c84d72-5927-4aac-b120-9a666d1babb2 | nishantAIandML/ALGOUNIVERSITY | recursion1.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution{
/*void local_recur(int i,int j,int N){
if(i>N/2||j<N/2+1){
return;
}
cout<<i<<" "<<j<<endl;
local_recur(i+1,j-1,N);
}
public:
void recur(int N){
int i=1;
int j=N;
local_recur... | ALGO | 0.999757 | 3.026088 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2025-07-09T12:41: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": "654b414d6c... |
b7a17267-8cd1-41f0-8ab0-b99fc23f478a | Redleaf23477/ojcodes | zerojudge/c575.cpp | // apcs 1060304 基地台
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long int ll;
void init();
void process();
const int N = 50005;
int n, k;
int arr[N];
int main()
{
ios::sync_with_stdio(false); cin.tie(0);
init();
process();
cout.flush();
return 0;
}
void init()
{
... | ALGO | 0.999999 | 4.317476 | {
"github_metadata": {
"branch": "master",
"commit_count": 183,
"repo_created_at": "2017-10-19T06:38: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": "99af514a... |
f2d90fb0-4f43-4ebb-966c-46f204dc0473 | Samarpitdua/Personal_favourite | #18_4_sum.cpp | class Solution {
public:
vector<vector<int>> fourSum(vector<int>& nums, int target) {
//Approach :2
//3 pointer + binary search
long long size = nums.size();
sort(nums.begin(),nums.end());
set<vector<int>>ans;
vector<vector<int>>ans2;
for(long long int i = 0;i... | ALGO | 0.999977 | 5.942297 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2020-11-05T18:05: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": "c69198d2740... |
f1db8ca4-43ec-4517-a45a-2dd9c711ee6d | JingxueLiao/Data_Structures_and_Algorithms | problems/path_sum_II.cpp | // Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
//
// For example:
// Given the below binary tree and sum = 22,
// 5
// / \
// 4 8
// / / \
// 11 13 4
// / \ / \
// 7 2 5... | ALGO | 0.99995 | 5.753866 | {
"github_metadata": {
"branch": "master",
"commit_count": 141,
"repo_created_at": "2016-07-05T01:09: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": "c1434445... |
de194f87-18b9-4c19-b4d2-988175ceefb8 | xsun89/HaizeiCpp | Teacher/9.动态规划习题课/2.HZOJ47.cpp | /*************************************************************************
> File Name: 2.HZOJ47.cpp
> Author: huguang
> Mail: <EMAIL>
> Created Time:
************************************************************************/
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <stac... | ALGO | 0.99999 | 3.831941 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2020-12-21T20:53: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": "54373c51e... |
a296de45-0275-48b7-af4a-a6ec211a9772 | zhxilin/leetcode | design/design-underground-system.cpp | //1396. Design Underground System
class UndergroundSystem {
public:
UndergroundSystem() {
}
void checkIn(int id, string stationName, int t) {
mxPassengers[id] = {stationName, t};
}
void checkOut(int id, string stationName, int t) {
int cost = t - mxPassengers[id].s... | ALGO | 0.998479 | 5.823024 | {
"github_metadata": {
"branch": "master",
"commit_count": 521,
"repo_created_at": "2020-05-09T03:40:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ee9d2ef... |
851d51e4-9010-4ef9-82bb-30e67003f6a8 | howardhsu123/Programming_Practices | Week5/HW2/HW2.cpp | #include <iostream>
using namespace std;
struct status{
int size;
int count_rows[7];
bool current_chessboard[7][7];
int count_columns[7];
};
int calculate(status &s, int row){
int answer = 0;
if(row == s.size)
return 1;
answer += calculate(s, row+1);
for (int i = 0; i < s.si... | ALGO | 0.999864 | 4.273893 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-03-08T19:21: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": "a2ce7437c9... |
6d80c464-6819-4adc-b636-58d8827c8b46 | vikas-reddy/programming-practice | anagrams-print-them-together.cpp | #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
using namespace std;
bool compare(char *a, char *b) {
strcmp(a, b);
}
void sortArrays(char *copies[], int indexes[], int len) {
sort(copies, copies + len, strcmp);
}
int main(int argc, const char *argv[])
{
if (argc < 2) {
co... | ALGO | 0.99978 | 3.902345 | {
"github_metadata": {
"branch": "master",
"commit_count": 204,
"repo_created_at": "2014-10-23T01:48: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": "6306e417... |
942747db-7471-4250-84dd-9135c8257ba3 | richiewahidin/cs371p-collatz | Collatz.cpp | // -----------
// Collatz.cpp
// -----------
// --------
// includes
// --------
#include <cassert> // assert
#include <algorithm>
#include "Collatz.hpp"
// use unsigned long long to prevent wrong output from overflow
#define ull unsigned long long
using namespace std;
// ----------------
// max_cycle_length
// -... | ALGO | 0.999586 | 5.228643 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2024-05-17T19:50: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": "5aa5a2248... |
7b5c01b1-786f-4df3-8648-0457c9693d90 | strahinjas/optimization-algorithms | homeworks/9/de.cpp | #include <array>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <random>
#include <unordered_set>
constexpr std::uint64_t WEIGHT_COUNT = 10;
constexpr std::uint64_t POPULATION_SIZE = 5 * WEIGHT_COUNT;
constexpr double F = 0.8... | ALGO | 0.999984 | 5.623842 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-12-09T07:48:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a75cdb4a94... |
ee9665fb-d7d2-449d-a866-babfcf474f0d | Black-Jade0/DSA | Codeforces/B. Swap and Delete.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pllll = pair<long long, long long>;
using vi = vector<int>;
using vs = vector<string>;
using vb = vector<bool>;
using vll = vector<ll>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<ll>>;
using vvb = ve... | ALGO | 0.999937 | 4.124853 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2025-01-16T10:00: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": "ec2684254... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.