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 |
|---|---|---|---|---|---|---|---|
d8f4d785-4c1f-4770-b0a2-c0f3e922c6a9 | Brunodev09/CPP_samples | enum/src/enum.cpp | //============================================================================
// Name : enum.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <ios... | TOOL | 0.913948 | 4.06842 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-11-03T01:14: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": "c1c1b00ecf... |
62e6e099-3733-452f-b05c-c1557d65cb9c | raincross7/code-similarity | codes/train_code/problem263/problem263_39.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using Graph = vector<vector<int>>;
using P = pair<int,int>;
#define MOD 1000000007
/*
H=2*10^3,W=2*10^3なので、
最初に思いついた方法だと、
O(HW(H+W))になってしまって厳しい、、、
前処理をすることで計算量を減らせないか考える
*/
int main()
{
int H,W;cin>>H>>W;
char S[2020][2020];
for (int i=1;i<... | ALGO | 0.999662 | 3.895477 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c6d1aff6c622... |
d659e113-c940-455a-82b1-ab046c69b18c | bjjfcbj/c- | pat/pat1004.cc | #include <cstdlib>
#include <iostream>
using namespace std;
int static max_lv = 0;
struct treenode
{
int parent;
int nl_sign;
treenode()
{
parent = -1;
nl_sign = 0;
}
};
int readnode()
{
int num = 0;
char a, b;
cin >> a >> b;
num = (a - 48) * 10 + b - 48;
return num;
}
void lv_count(treenode* list, i... | ALGO | 0.999975 | 3.631812 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2019-04-28T14:01: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": "497415db5... |
7d80c31a-9690-4507-8ef5-9d95b4fc1c8a | Kernivel/advent_of_code | source/day5.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <regex>
using namespace std;
class SupplyStack
{
private:
vector<vector<char>> initStack;
public:
SupplyStack()
{
initStack = getInitialStacks();
printStack(initStack);
}
vector<ve... | ALGO | 0.99958 | 4.62034 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-12-01T08:47: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": "d300a3a514a... |
b6ca925d-ea21-4e86-832e-0e09ac0ebbba | majora2007/ComputerGraphics | labyrinth/main.cpp | #include <math.h>
#include <freeglut.h>
#include <stdlib.h> //- needed for exit() function
#include <imathvec.h> //- Vector library
#include "loader.h"
#include "mesh.h"
#include <fstream>
using namespace std;
#define MIN2(a,b) (((a) < (b))?(a):(b))
#define MAX2(a,b) (((a) > (b))?(a):(b))
// --- Model Defines
... | TOOL | 0.944074 | 3.928699 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2012-10-09T16:26: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": "9af2e13bfc... |
552fd061-8d44-4cd4-a1a5-a1f6bc8ddc7a | Xdydy/OJCode | leetcode/hot100/3_longest_substring_without_repeating_characters.h | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define maxn (int)(1e6 + 10)
#define IOS ios::sync_with_stdio(0);
#define FFF freopen("out", "w", stdout);
class Solution {
private:
int cnt[200];
bool judge() {
for (int i = 0; i < 200; i++) {
if (cnt[i] >= 2 ) {
... | ALGO | 0.999918 | 4.692469 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2022-12-29T11:46: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": "afa77f62e2d... |
1c50ee38-c1df-4ec3-bcb6-99da71e87dca | ShantoNoor/Data-Structures-and-Algorithms | Recarsion.cpp | #include <iostream>
using namespace std;
// Head recurtion
void fun(int n)
{
if(n > 0)
{
fun(n-1);
cout << n << " ";
}
}
// Tail recurtion
void tfun(int n)
{
if(n > 0)
{
cout << n << " ";
tfun(n-1);
}
}
// staric Tail recurtion
int stfun(int n)
{
static int x = 0;
if(n > 0)
{
x++;
cout << n << ... | ALGO | 0.998952 | 3.400762 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-06-30T17:41: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": "f6bff1b259... |
acf1ea3e-2808-4764-a4b2-36b22f875df0 | saltedshark/HeteroBFS | src/bfs_seq.cpp | /***
* 函数功能:使用基于队列的版本对图进行遍历,不管图有没有连通
* 更新:将涉及vector的数组全换为普通数组
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string>
using std::string;
#include <chrono>
using namespace std::chrono;
#include <iostream>
#include <queue>
#include <iostream>
#include <fstream>
#include <cstdint>
#include <iomanip>// 用于十六进制输出
... | ALGO | 0.993631 | 3.789171 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2025-03-04T01:07:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae61b3cf5... |
09371297-00b4-4268-a2b8-7f45cb176806 | deezombiedude612/algorithms_cpp | LinearSearch.cpp | /* Linear search of an array */
#include <iostream>
#include <array>
using namespace std;
/* Compare key to every element of array until location is
* found or until end of array is reached; return location of
* element if key is found or -1 if key is not found
*/
template<typename T, size_t size>
int linearSearch... | ALGO | 0.999652 | 5.41678 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2019-07-05T14:39: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": "a24b5f5020... |
927c2098-ded2-4402-96a7-1ce5c1e64f0b | ishandutta2007/codeforces-i | ivan100sic/normal/337/E.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const int SITO_MAX = 1000000;
int f[SITO_MAX+1];
vector<int> prosti;
struct sito {
sito() {
for (int i=2; i<=SITO_MAX; i++) {
if (f[i] == 0) {
f[i] = i;
prosti.push_back(i);
}... | ALGO | 0.999877 | 4.071053 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:39: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": "5419370b5917... |
87997617-331b-4cad-b42f-e27f7ee81d20 | UMARU-xiaomai/study-acm | Day11/p3647.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 101;
const int INF = 1e9;
int n, m;
int dist[MAXN][MAXN];
inline void Floyd() {
for (int k = 1; k <= n; ++k) { // 允许中间经过1~k的节点
for (int i = 1; i <= n; ++i) { // 起点
for (int j = 1; j <= n; ++j) { // 终点
dist[i][j] = m... | ALGO | 0.999996 | 4.054626 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-08-27T02:25: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": "5cf2b69a00fb... |
d40589ab-1228-4ea6-a65d-5dd58e3226a4 | stenioaraujo/uva_problems | 725.cpp | //////////////////////////////////
// Algoritimo Avancado
// Lista 3 basico
// P6 - 725 - Division
//
// Autor: <NAME>
// <EMAIL>
//////////////////////////////////
#include <stdio.h>
int dif(char *conc) {
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
if (conc[i] == conc[j] && i != j) {
... | ALGO | 0.999296 | 3.8975 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2014-06-08T14:15:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3c5824705a... |
d68ecc8d-be50-4c57-92a4-53f387e3d425 | Hironobu-Kawaguchi/atcoder | atcoder/abc113_d.cpp | // https://atcoder.jp/contests/abc113/tasks/abc113_d
#include<iostream>
// #include<algorithm>
// #include<string>
// #include<numeric>
// #include<vector>
// #include<map>
// #include<tuple>
// #include<set>
// #include<queue>
// #include<deque>
// #include<regex>
// #include<bitset>
// #include<iomanip>
// #include<c... | ALGO | 0.999914 | 4.469548 | {
"github_metadata": {
"branch": "master",
"commit_count": 865,
"repo_created_at": "2019-07-16T15:08:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5ebd830... |
45872c52-e0e7-43b5-821d-01c0f8ce3f33 | syedkhadeen/Data-Structures | labtask8.cpp | #include<iostream>
using namespace std;
class BST{
private:
class Node{
Node*left;
int data;
Node*right;
Node():data(0),left(NULL),right(NULL){}
Node(int data):data(data),left(NULL),right(NULL){}
friend class BST;
friend in... | ALGO | 0.999918 | 4.420384 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-09-07T11:47: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": "23bbf9f5d0... |
f383023b-379a-4fe4-b777-95243cbf97d0 | wakabass-man/Let-s-SP_2019 | 소스.cpp | #include <iostream>
#include <ctime>
#include <cstdlib>
#include <sstream>
#include <fstream>
#include <vector>
#include "GL/glew.h"
#include "GL/freeglut.h"
#include "GL/glm.hpp"
#include "GL/ext.hpp"
#include "GL/gtc/matrix_transform.hpp"
#include "GL/freeglut_ext.h"
using namespace std;
using namespace glm;
float... | TOOL | 0.976729 | 3.488577 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-05-14T14:47: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": "f808669fe6... |
f8ed5dc0-4aa4-45e6-b8eb-5478c803e346 | imhdx/My-all-code-of-Vjudge-Judge | HYSBZ/2038/18140105_AC_888ms_3064kB.cpp | #include<bits/stdc++.h>
using namespace std;
struct ac
{
int l,r,id;
}que[50004];
int block;
long long gcd(long long a,long long b)
{
if (b==0) return a;
return gcd(b,a%b);
}
bool cmp(ac q,ac p)
{
if (q.l/block!=p.l/block) return q.l/block<p.l/block;
if ((q.l/block)&1)
return q.r<p.r;
else ... | ALGO | 0.999978 | 3.962935 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2019-03-16T14:21: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": "373a686fd... |
eaaf6e62-74fc-4b33-abbf-0c8de24dc1d2 | cjin/exercises | leetcode/p206-reverse_linked_list.cpp | /*
206
Reverse Linked List
https://leetcode.com/problems/reverse-linked-list/
Description:
Reverse a singly linked list.
Hint:
A linked list can be reversed either iteratively or recursively. Could you
implement both?
(EASY) Linked List
Similar Problems: 92 Reverse Linked List II, 156 Binary Tree Upside Down,
2... | ALGO | 0.999807 | 6.087918 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2015-03-18T20:17: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": "668cc5af9... |
a05806c3-1fcd-471f-b6e5-48a543d15424 | checkoutb/LeetCodeCCpp | ge1100/LT1143_Longest_Common_Subsequence.cpp |
#include "../header/myheader.h"
class LT1143
{
public:
// D D
// detail 里 全是 二维数组。
// for(int i=1; i <= n; i++){
// for(int j=1; j <= m; j++){
// if(text1[i-1] == text2[j-1])
// lookup[i][j] = 1 + lookup[i-1][j-1];
// else
// lo... | ALGO | 0.999956 | 5.079608 | {
"github_metadata": {
"branch": "master",
"commit_count": 285,
"repo_created_at": "2019-04-22T09:20:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "83c47d7b... |
c66078b7-1cfc-403a-80c6-2eaf4f049227 | j03m/algos-cpp | tree-graphs/courses.cpp | #include<vector>
#include<unordered_map>
#include<stack>
#include<iostream>
using namespace std;
bool findCycle(int head, unordered_map<int, vector<int>> &graph, vector<bool> &black, vector<bool> &gray){
if (black[head]){ return false; }
if (gray[head]){ return true; }
gray[head] = true;
const auto ch... | ALGO | 0.999643 | 5.986861 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2020-10-15T11:30: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": "51e40c1ca... |
9476c13a-d7a4-4b0b-bf2f-99099e55cea6 | rjenez/W266-final-project | data/programming-homework-dataset-plagiarism-detection/src/B2016/Z1/Z3/student5154.cpp | /*B 2016/2017, Zadaća 1, Zadatak 3
NAPOMENA: ulaz/izlaz za zadatke je specificiran
javnim autotestovima. Zalbe za ne analiziranje testova
se ne uvazavaju!
NAPOMENA: nece svi (javni) testovi sa zamgera biti
dostupni na c9.
*/
#include <iostream>
#include <vector>
#include <cmath>
typedef std::vector<std::v... | ALGO | 0.999812 | 4.809339 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2022-02-09T00:45:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5e97fc6d3... |
7d302047-b906-4adf-814d-d43121a76063 | atp224/COEN145 | Program3/dijkstra_mpi.cpp | #include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <mpi.h>
#include <memory.h>
#define ROWMJR(R, C, NR, NC) (R*NC+C)
#define COLMJR(R, C, NR, NC) (C*NR+R)
#define a(R, C) a[ROWMJR(R,C,ln,n)]
#define b(R, C) b[ROWMJR(R,C,nn,n)]
static void findDistance(int ** dista... | ALGO | 0.999927 | 4.235056 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2022-12-20T06:16: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": "e747f2fdede2... |
a2d7d52a-c4b9-4bdb-87f7-291ed67317d1 | qwaker00/Olymp | CodeForces/Codeforces Trainings Season 1 Episode 12/I/hax.cpp | #ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cmath>
#include <string>
#include <cstring>
#include <queue>
#include <vector>
#include <set>
#include <deque>
#include <map>
#include <functional>
#inc... | ALGO | 0.99989 | 3.915446 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2012-09-04T15:56:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "669b3f56f... |
70a2f69d-cf6f-4f90-a957-369b459a6b28 | xforce2099/Grafika | QtFramework/AlgebraicHyperbolic/AlgebraicHyperbolicArc3.cpp | #include "AlgebraicHyperbolicArc3.h"
#include <cmath>
using namespace cagd;
AlgebraicHyperbolicArc3::AlgebraicHyperbolicArc3(GLdouble _alpha): LinearCombination3(0.0, _alpha, 4)
{
this->alpha = _alpha;
}
GLboolean AlgebraicHyperbolicArc3::BlendingFunctionValues(GLdouble u, RowMatrix<GLdouble>& values) const
{
... | ALGO | 0.996357 | 4.837617 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-07-02T20:02: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": "fe03cfb4a6... |
ee99d34c-a947-44e2-88ce-2489cf21e1d6 | valorve/csgo-internal | csgo_internal/src/features/hvh/peek_state.cpp | #include "peek_state.hpp"
#include "../../game/dormant.hpp"
#include "../../game/engine_prediction.hpp"
#include "../../game/override_entity_list.hpp"
#include "../../globals.hpp"
#include "../../interfaces.hpp"
#include "../../utils/threading.hpp"
#include "autowall.hpp"
#include "exploits.hpp"
#include "hvh.hpp"
usi... | ALGO | 0.975218 | 4.732459 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-12-21T08:58: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": "b3b3d3b0c377... |
74cec12c-7c2a-4a49-adff-96da4b8126b6 | esbmc/esbmc | regression/esbmc-cpp/cpp/ch5_11/main.cpp | // Fig. 5.14: fig05_14.cpp
// Attempting to modify a constant pointer to constant data.
#include <iostream>
using std::cout;
using std::endl;
int main()
{
int x = 5, y;
// ptr is a constant pointer to a constant integer.
// ptr always points to the same location; the integer
// at that location cannot b... | TOOL | 0.987102 | 4.477233 | {
"github_metadata": {
"branch": "master",
"commit_count": 24772,
"repo_created_at": "2015-06-20T19:35:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 360,
"forks": 115,
"issues": 452,
"pull_requests": 82
},
"file_meta": {
"content_id": "... |
04601d96-ee73-4f9c-aac0-c856aa7cb871 | kazimyr/gb_lern | Основы_С++/Урок5.Функции./dz/ls5.cpp | #include <iostream>
#include <cmath>
// #include <string>
void printArray(const size_t SIZE, const double *ar) {
for (size_t i = 0; i < SIZE; std::cout << ar[i] << " ", ++i);
std::cout << std::endl;
}
void printArray(const size_t SIZE, const int *ar) {
for (size_t i = 0; i < SIZE; std::cout << ar[i] << " ... | ALGO | 0.999177 | 4.644598 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2022-12-07T10:53: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": "5469754ca74... |
fa060e94-d41c-4461-a17b-60d2df036401 | Ahtkom/ccyy | src/math/algorithm/heuristic/SimulatedAnnealingSolver.cc | #include <math/algorithm/heuristic/SimulatedAnnealingSolver.h>
namespace ccyy {
namespace math {
namespace alg {
void SimulatedAnnealingSolver::optimize()
{
allocCurrentSolution();
allocBestSolution();
updateCurrentVal();
while (currTemperature() > 1e-3) {
for (std::size_t i = 0; i != markovL... | ALGO | 0.99983 | 4.290758 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2022-02-10T01:55: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": "7a289a71845... |
fac7b708-364c-45a3-bc01-dbe2a7455420 | akva2/IGA_Soliton | IGA_1D/1_Spline_Code.cpp | // Codes for generating knot vector, continuity vector and manipulating splines.
#include "../Settings.h"
#include "IGA_1D.h"
//----------------------------------------------------------------------------//
// Script for creating the knot vector. //
//----------------------------... | ALGO | 0.999943 | 5.724449 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2017-06-08T09:09: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": "2741960ad... |
a23c7954-bc16-4984-ac62-b0d17938bd41 | 1604078-MEHEDI/LightOJ | 1150/sol1.cpp | #include <bits/stdc++.h>
using namespace std;
#define INF 1<<30
#define endl '\n'
#define maxn 1000005
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
typedef long long ll;
const double PI = acos(-1.0);
const ll mod = 1e9 + 7;
inline void normal(ll... | ALGO | 0.99984 | 3.913974 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2019-07-10T19:20: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": "432e9e9a9... |
93edf357-6d63-42e6-861c-4c7bda984469 | eff3ct/Baekjoon-Online-Judge-Problem-Solving | 1504/1504.cpp | #include <iostream>
#include <vector>
#include <utility>
#include <queue>
#define INF 11987654321LL
using namespace std;
typedef long long ll;
vector<vector<pair<int, int>>> adj;
ll solve(int start, int end) {
vector<ll> dist(adj.size(), INF);
priority_queue<pair<ll, int>, vector<pair<ll, int>>, greater<pai... | ALGO | 0.999927 | 4.462025 | {
"github_metadata": {
"branch": "main",
"commit_count": 185,
"repo_created_at": "2021-07-05T06:02: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": "2299c4c42f... |
d699a19e-5660-4eb2-b60f-8236b5977820 | shohzod3112/cplusplus | consol/Nazariya/Shart operatoriga oid masalalar (if)/15/15/main.cpp | // Muallif: <NAME>
// Sana: 15.02.2013
// Maqsad: Uchta son berilgan. Shu sonlarning yig'indisi eng katta bo'ladigan ikkitasini ekranga chiqaruvchi programma tuzing.
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
cout << "a = "; cin >> a;
cout << "b = "; cin >> b;
cout << "c = "; ... | ALGO | 0.999768 | 3.473215 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-10-28T20:29:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "29ae0c77c578... |
e59d3e85-00f0-4d8f-a48d-8d856d00b962 | mounchiliu/VIO | HW3/CurveFitting_LM/app/CurveFitting.cpp | #include <iostream>
#include <random>
#include "backend/problem.h"
using namespace myslam::backend;
using namespace std;
// 曲线模型的顶点,模板参数:优化变量维度和数据类型
class CurveFittingVertex: public Vertex
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
CurveFittingVertex(): Vertex(4) {} // abc: 三个参数, Vertex 是 3 维的
virtual st... | ALGO | 0.999552 | 5.183468 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2019-07-13T17:15:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d0ecd70c... |
c56f4ee0-0e17-4629-8f06-ea68f3041005 | chenhuili1/test1Repository | MpcDlg_chl_ruanzhu/MpcDlg_chl_ruanzhu/IMC_Generic/matlab/Getintput_u.cpp | //
// Academic License - for use in teaching, academic research, and meeting
// course requirements at degree granting institutions only. Not for
// government, commercial, or other organizational use.
// File: Getintput_u.cpp
//
// MATLAB Coder version : 5.0
// C/C++ source code generated on : 09-Oct-2020... | ALGO | 0.998458 | 3.869475 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2021-01-21T06:28: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": "d627462d6... |
ab125ab5-a61f-4932-9168-83a6a449b7d8 | caputdraconis050630/algorithm | baek/baek_1992.cpp | #include <bits/stdc++.h>
using namespace std;
int arr[64][64];
void bf(int y, int x, int count) {
int comp_value = arr[y][x];
bool flag = false;
for (int i = 0; i < count; i++) {
for (int j = 0; j < count; j++) {
if (arr[y + i][x + j] != comp_value) {
cout << '(';
... | ALGO | 0.999879 | 4.170986 | {
"github_metadata": {
"branch": "master",
"commit_count": 316,
"repo_created_at": "2021-07-07T20:48: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": "c7543dcf... |
ec09ec9c-8b52-4e82-8c01-35232b8fb0f8 | MdAlSiam/My-Codeforces-Solutions | 1228C.cpp | using namespace std;
#include <bits/stdc++.h>
#define ll long long int
#define dd double
#define scl(x) scanf("%lld", &x)
#define scll(x, y) scanf("%lld %lld", &x, &y)
#define scd(x) scanf("%lf", &x)
#define scdd(x, y) scanf("%lf %lf", &x, &y)
#define prl(x) printf("%lld\n", x)
#define prll(x, y) printf("%lld %lld\n... | ALGO | 0.999984 | 4.257977 | {
"github_metadata": {
"branch": "master",
"commit_count": 201,
"repo_created_at": "2020-01-05T11:40:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dda959c9... |
ff156b3b-468b-42ff-a7df-745f5924a84f | apache/singa | src/model/layer/softmax.cc | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | DATA | 0.989775 | 6.295126 | {
"github_metadata": {
"branch": "master",
"commit_count": 2997,
"repo_created_at": "2015-04-02T07:00:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3512,
"forks": 1280,
"issues": 21,
"pull_requests": 30
},
"file_meta": {
"content_id": "... |
2fa956d7-e04e-477e-96d9-9b9db8e201b8 | nandlalKumar-Code/LeetCodeNGfg | Job Sequencing Problem - GFG/job-sequencing-problem.cpp | //{ Driver Code Starts
// Program to find the maximum profit job sequence from a given array
// of jobs with deadlines and profits
#include<bits/stdc++.h>
using namespace std;
// A structure to represent a job
struct Job
{
int id; // Job Id
int dead; // Deadline of job
int profit; // Profit if job... | ALGO | 0.999968 | 5.439142 | {
"github_metadata": {
"branch": "main",
"commit_count": 231,
"repo_created_at": "2022-10-23T05:15: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": "ccfab3592e... |
b3ab77a9-7556-4c8e-b73c-7601fe86783a | funeralbot/sanchezkalonnie_CSC5_fall2017 | hmwk/Assignment 5/Drop Score Avg/main.cpp | //******************************************************************************
//* Author: <NAME> *
//* *
//* Created on November 12, 2017, 10:36 AM *
... | ALGO | 0.998381 | 3.963559 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-10-09T17:18:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1187d9c44a... |
54f93c02-fa3f-493a-b1d9-c0464fc0632a | stephennaicken/TrustCuda | TrustCuda/Eigentrust.h | #pragma once
#include "ReputationSystem.h"
class Eigentrust :
public ReputationSystem
{
private:
double error;
protected:
inline unsigned int idx2c(unsigned int i, unsigned int j, unsigned int ld) const
{
return (j*ld) + i;
};
virtual bool hasConverged(double * trust_vec_next, double * trust_vec_orig) = 0;
pub... | ALGO | 0.99317 | 6.012036 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2014-06-10T06:30:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "03371dbeb2... |
0117abb8-c256-4f87-aa2e-2ecdc32ca49f | VaibhavVerma16113108/Competitive-Programming | Leetcode/Cells-With-Odd-Values-In-A-Matrix.cpp | class Solution
{
// 1. Count which rows and which columns appear odd number of times.
// 2. The cells which are in the pos(i,j) such that row i % 2 != col j % 2 are the ones that will remain odd after the specified operations. This value is given by the return statement. (Cells in the position where rows and co... | ALGO | 0.999983 | 5.859863 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2021-01-26T07:09:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce1d0a436d4... |
7c474c87-f4ec-47c0-8d75-de435f08e7d9 | alexeyqu/mipt-alexeyqu | 3 term/algos/suffix/sais/sais.cpp | #include "sais.h"
SuffixArrayInducedSorting::Worker::Worker (const std::vector <Index_t> &str, std::vector <Index_t> &suffArray, const Index_t alphabetSize) : \
str_ (str), suffArray_ (suffArray), alphabetSize_ (alphabetSize) {}
void SuffixArrayInducedSorting::Worker::classifyChars() //+
{
REPORT ("classifyChars"... | ALGO | 0.998014 | 4.300258 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2016-02-04T15:31:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2cbf7aadc... |
5ae84302-0c8c-4c5b-89d0-a54c8c4d1db2 | DILET1/usacoarchive | USACO training problems/2019 February/gold/paintbarn.cpp | #include <algorithm>
#include <fstream>
#include <iostream>
#include <vector>
using std::cout;
using std::endl;
using std::max;
using std::vector;
const int WIDTH = 200;
int main(){
std::ifstream in("paintbarn.in");
std::ofstream out("paintbarn.out");
int regions, optimal;
in >> regions >> optimal;
vector<vector... | ALGO | 0.999663 | 4.32375 | {
"github_metadata": {
"branch": "main",
"commit_count": 250,
"repo_created_at": "2022-01-28T18:13:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72b0bb1b12... |
bfb0203c-5a68-4dc4-97e4-7c31034200b0 | Gfernandes10/tello_sim | slprj/grt/NumLinearModel/NumLinearModel.cpp | /*
* Code generation for system model 'NumLinearModel'
*
* Model : NumLinearModel
* Model version : 6.27
* Simulink Coder version : 25.1 (R2025a) 21-Nov-2024
* C++ source code generated on : Fri May 30 20:24:35 2025
*
* Note that the functions contained in this file are part of... | TOOL | 0.947702 | 6.263542 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2025-07-04T00:12: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": "393c0289c... |
c13613e9-da06-4742-891a-8c57dccc5624 | bluesquanium/Algorithm | Baekjoon/q15686.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
using namespace std;
#define abs(X) ((X)>0?(X):-(X))
int N, M, num_c, num_h, ans = 999999999;
int map[51][51], sel_c[13], dist[100];
vector< pair<int,int> > h, c;
void Dfs(int count, int prev_c) {
if(count<M) {
for(int i = prev_c+1; i <... | ALGO | 0.99988 | 3.340721 | {
"github_metadata": {
"branch": "master",
"commit_count": 145,
"repo_created_at": "2019-03-09T10:10:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "20ce774d... |
c99b1670-b786-4908-b388-e2bcc870078d | jasonapcs/transform | transform.cpp | /*
ID: jason.z2
PROG: transform
LANG: C++
*/
#include <fstream>
#include <vector>
#include <string>
#include <iostream>
struct sqPattern {
public:
sqPattern(int sz, std::string items) : size(sz) {
pattern.resize(sz);
int index = 0;
for (int i = 0; i < size; i++)
for (int j = 0; j < size; j++) {
pattern[... | ALGO | 0.99999 | 3.700055 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-12-05T13:26:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b8e3bfe12... |
709e3aa7-871d-49ab-a648-23966b3b5c12 | JeongGod/Algorithm-Coding | Back_Tracking/14888.cpp | #include <cstdio>
#include <iostream>
#include <string.h>
int max, min, n;
int *number;
bool first = true;
void operate(int start, int op[], int cal,int ans)
{
//계산하는 법
if (start != 0)
{
if (cal == 0) // +
{
if (start == 1) // 처음부분
ans = number[start - 1] + number... | ALGO | 0.999897 | 3.253287 | {
"github_metadata": {
"branch": "master",
"commit_count": 177,
"repo_created_at": "2020-07-12T09:56: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": "fde10fdf... |
57079708-44cf-4f09-822d-c7e47141fd08 | anubhat222/cnsLab | railtrial.cpp | #include<bits/stdc++.h>
using namespace std;
string encrypt(char pt[10000],int key){
int ptl=strlen(pt);
vector<vector<char>>railFence(key,vector<char>(ptl));
for (int i=0; i < key; i++)
for (int j = 0; j <ptl; j++)
railFence[i][j] = '\t';
bool flag=false;
int r=0,c=0;
for(in... | ALGO | 0.999996 | 4.343547 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-06-04T02:38: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": "2bf92f9ab3db... |
64890fed-dea6-430b-8bcd-ed758c0d5c29 | lifeslesson/UML-Data-Structures | Four Short Programs/Painting a wall.cpp | /* <NAME> Data
Data Structures
Dr. <NAME>*/
/* This program determins the area of a wall from user input Hight and Widths, determines the amount of paint
needed to cover the wall, and the amount of cans required based on that paint usage*/
#include <iostream>
#include <cmath> // Note: N... | ALGO | 0.967575 | 5.917477 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-06-05T21:36:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c56ed0cc833... |
e3dd2d10-1aba-4442-abbf-a680a84ec17a | roy0701/AtCoder | ABC/ABC266/ABC266C.cpp | #include <iostream>
using namespace std;
bool ccw(int x1, int y1, int x2, int y2, int x3, int y3) {
return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) > 0;
}
int main() {
int Ax, Ay, Bx, By, Cx, Cy, Dx, Dy;
cin >> Ax >> Ay >> Bx >> By >> Cx >> Cy >> Dx >> Dy;
bool ans = ccw(Ax, Ay, Bx, By, Cx, Cy) && ccw(Bx... | ALGO | 0.999716 | 4.279864 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-05-17T05:01: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": "3e2223b1efeb... |
6e44a0ca-dec8-4f3b-bf0e-fca9480540cf | GilgameshxZero/altair | bayan/2014-elim/1.cpp | #include <algorithm>
#include <bitset>
#include <limits>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <functional>
#include <map>
#include <queue>
#include <utility>
#include <set>
#include... | ALGO | 0.999677 | 3.885034 | {
"github_metadata": {
"branch": "master",
"commit_count": 485,
"repo_created_at": "2021-08-08T21:45:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "47d572e3... |
8cc388f3-c706-41d7-88ed-5dbe4c0a60bb | yinchunxiang/LeetCode | LRUCache/LRUCache.cc | #include <isotream>
#include <tr1/unordered_map>
#include <list>
using namespace std;
typedef pair<int, int> IntPair
typedef list< IntPair > IntPairList;
typedef std::tr1::unordered_map<int, IntPairList::iterator> IntPairMap;
class LRUCache{
public:
LRUCache(int capacity) : limit_(capacity){
}
... | ALGO | 0.992648 | 4.743495 | {
"github_metadata": {
"branch": "master",
"commit_count": 230,
"repo_created_at": "2014-07-15T00:07: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": "56780c75... |
4880fb7b-82a0-4e1b-8386-a9e729d44319 | Witalia008/competitions | Random/Vinnytsia/2010/Round 1/gearset.cpp | #include <stdio.h>
#include <cstdlib>
#include <memory.h>
#define For(i, a, b) for (int i = a; i <= b; i++)
#define nmax 100
using namespace std;
/*struct tmas{
int num[nmax+1];
int len;
};
int longlen(tmas a)
{
int i=1;
while ((a.num[i]==0)&&(i<nmax)) i++;
return nmax-i+1;
}
tmas dob(tmas a,tma... | ALGO | 0.999971 | 3.506683 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2021-03-31T16:10:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f1696f9d61... |
5c7798b3-1e8d-40a3-b08b-3f2c5235915a | abstractspoon/ToDoList_Dev | Core/3rdParty/myspell/mythes.cxx | #include "license.readme"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include "mythes.hxx"
extern void safestrncpy(char* dest, unsigned int destLen, const char* src, int count);
MyThes::MyThes(const char* idxpath, const char * datpath)
{
nw = 0;
encoding = NULL;
list =... | TOOL | 0.917079 | 3.322321 | {
"github_metadata": {
"branch": "master",
"commit_count": 10408,
"repo_created_at": "2016-08-23T07:19:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 120,
"forks": 30,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9ff... |
620a6d51-a179-4b18-a252-37f964619532 | qunnn41/hihocoder | 03_make_up_submit.cpp | //#include <iostream>
//using namespace std;
//
//int main() {
// int n;
// cin >> n;
// while (n --) {
// int not_submit, num_card;
// cin >> not_submit >> num_card;
// int day[not_submit + 2];
// for (int i = 1; i <= not_submit; ++i)
// cin >> day[i];
// day[0] =... | ALGO | 0.999055 | 3.57533 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2015-12-03T03:13: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": "712fa81926... |
f2e327ac-851d-4978-97d7-e45c51fde393 | PetrGuan/LeetCodes | easy/167.TwoSumII.cpp | /*
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Please note that your returned answers (... | ALGO | 0.999981 | 6.166457 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2016-02-09T12:29: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": "6e812730c... |
44edb976-5632-4066-8bcf-d519a7c242c0 | Fatin007/ass_embly | Lab/cpp/CA Lab/RDbinary.cpp | #include <bits/stdc++.h>
using namespace std;
void displayBool(vector<bool> b);
// Binary to Decimal Conversion (2's complement handling)
int binaryToDecimal(const std::string& bin) {
int n = bin.length();
bool isNegative = (bin[0] == '1');
if (!isNegative) {
// Positive number, standard binary t... | ALGO | 0.999567 | 5.578284 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2025-01-09T05:04: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": "5d16c0e0996... |
d0175351-5a91-4830-8b7c-08ba18f5d2fd | sonible/VCTR | include/vctr/Expressions/BasicMath/Clamp.h | /*
==============================================================================
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
Copyright 2022- by sonible GmbH.
This file is part of VCTR - Versatile Container Templates Reconceptualized.
VCTR is free software: you can redistribute it... | TOOL | 0.994552 | 7.758061 | {
"github_metadata": {
"branch": "develop",
"commit_count": 224,
"repo_created_at": "2022-11-14T11:11:02.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 26,
"forks": 1,
"issues": 17,
"pull_requests": 1
},
"file_meta": {
"content_id": "975f36... |
23251d34-f48b-4dfa-8a04-b5e3592e825d | SRINJOY59/DSA | OA/passcode.cpp | #include<bits/stdc++.h>
using namespace std;
int solve(string password, string code, int n, int m, int index, int indC, vector<vector<int>>&dp){
if(indC >= m){
return 0;
}
if(index >= n){
index = 0;
}
if(index < 0){
index = n-1;
}
if(dp[index][indC] != - 1){
... | ALGO | 0.999985 | 4.149435 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-07-11T12:18: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": "be78c6be412... |
afd0475b-6f2f-4a8a-ad44-601b42fa9582 | garfield-pr/playground | cpp/Blatt-8/calcpi.cpp | #include <iostream>
#include <iomanip>
#include <random>
#include <cmath>
#include <thread>
#include <mutex>
void calcpi(const long long N, long long &hits, std::mutex &mutex, const int seed)
{
std::default_random_engine generator(seed);
std::uniform_real_distribution<double> distribution(0,1.0);
// fixme
// std:... | ALGO | 0.99923 | 4.935072 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2018-03-31T17: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": "ddd596435... |
1c4983c8-1a48-403d-9765-7b32d991d323 | yfguo91/packballs | kodtree.h | #ifndef _kodtree_
#define _kodtree_
#include<list>
#include<vector>
#include <limits>
#include <algorithm>
#include <string>
#include <fstream>
#include <cstdlib>
#include <iostream>
#include <time.h>
using namespace std;
typedef double Point[3];
typedef double Box[6];
struct WpInfo{
void *info;
int infotype;
bool... | ALGO | 0.985555 | 3.577477 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-06-03T02:03:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "67ee9a66d5... |
0b84502d-b571-4888-9c48-52b72f0af100 | daviddoria/PatchComparison | Drivers/CompareOverBlur.cpp | // STL
#include <iostream>
#include <vector>
// Submodules
#include <ITKHelpers/ITKHelpers.h>
// Custom
#include "SSD.h"
int main(int argc, char* argv[])
{
if(argc != 4)
{
std::cerr << "Required arguments: patch1filename patch2filename outputFileName" << std::endl;
return EXIT_FAILURE;
}
std::string... | ALGO | 0.995202 | 5.873246 | {
"github_metadata": {
"branch": "master",
"commit_count": 133,
"repo_created_at": "2012-05-21T14:34:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7502e50e... |
6c1081d2-77e9-4983-bb44-44608a3886f9 | timi-liuliang/echo | thirdparty/mlpack/thirdparty/armadillo/include/armadillo_bits/op_find_meat.hpp | // Copyright 2008-2016 <NAME> (http://conradsanderson.id.au)
// Copyright 2008-2016 National ICT Australia (NICTA)
//
// 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.or... | ALGO | 0.993783 | 3.425041 | {
"github_metadata": {
"branch": "master",
"commit_count": 3016,
"repo_created_at": "2018-03-10T04:07:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 971,
"forks": 116,
"issues": 254,
"pull_requests": 0
},
"file_meta": {
"content_id": "c... |
6ba19e1a-861d-4e3f-996e-b948c3173dec | priyamshankar/programs | winter intersem1/DSA/Trees/binaryTree.cpp | #include <iostream>
using namespace std;
class node
{
public:
int data;
node *left;
node *right;
node(int data)
{
this->data = data;
this->left = NULL;
this->right = NULL;
}
};
node *putData(node *&root)
{
int data;
cin >> data;
root = new node(data);
if... | ALGO | 0.999835 | 4.478347 | {
"github_metadata": {
"branch": "master",
"commit_count": 231,
"repo_created_at": "2021-07-29T05:13: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": "f63d0b95... |
3fc3ad07-4557-47d9-88a5-d6d891968f74 | SVCE-ACM/A-December-of-Algorithms-2022 | December - 19/C++_MugundhanY.cpp | //Question 19:
#include <bits/stdc++.h>
using namespace std;
void ans(char substring1[], int n1, char substring2[], int n2){
unordered_map<char, int> map;
cout << "\"";
for(int i=0; i<n2; i++){
map[substring2[i] - 'a']++;
}
for(int i =0 ; i<n1; i++){
if(map[substring1[i] - 'a'] > 0)... | ALGO | 0.999887 | 3.214318 | {
"github_metadata": {
"branch": "master",
"commit_count": 626,
"repo_created_at": "2022-11-28T07:12:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 14,
"forks": 88,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b2fdb6... |
a6c25c4a-e80f-4887-a0fb-72fd52adce7a | cemeteryparty/NYCU-CS-HW | 2019-Fall/Intro-to-Algorithms/src/1016/1016(dp).cpp | #include <iostream>
#include <algorithm>
#include <map>
class Assignment {
public:
int score, deadline;
friend bool operator<(const Assignment & a1, const Assignment & a2) {
return a1.score < a2.score;
}
};
int Maximum(const int & d1, const int & d2) {
return d1 > d2?d1:d2;
}
int main(int argc, char const *argv... | ALGO | 0.99997 | 4.55753 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2021-01-18T13:03: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": "f9ea17c279b... |
d852db0a-9367-4362-a96e-d46fc411daa9 | padhraigodonoghue/masterNodeAlpha | masterNodeFirmware/functionLookUp.ino | // compensates for rolling index of the superFrameArray
int lookUp(unsigned long timeIn)
{
// determine which note of the n-note composition is imminent...
// where n = (framesPerAct * actsPerComposition), i.e. 27-note...
// and number of first note is 0 and last note, 26
int noteNumber = (int) ((timeIn % (un... | ALGO | 0.990372 | 3.432901 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2014-11-24T15:05: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": "71dcce3d4... |
dc3194c2-0878-4e69-b950-575fa147c377 | ashok159/Software-Design-Analysis-I-CSCI-135-Programs | indent.cpp | /*
Author: <NAME>
Course: CSCI-135
Instructor: <NAME>
Assignment: Indent
Write a new program indent.cpp that
enhances the program from the previous task.
As it reads the input line by line, it should
also count the number of open and closed { } in
it, and keep track of how many blocks is currently
open at the beg... | TOOL | 0.995495 | 5.590776 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-01-13T22:12: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": "2a28904fc241... |
87da146e-abe4-4458-ad13-1f417bb19692 | Salifya12/TCD-Yr1 | Week 7 P3 Triangle Classification.cpp | #include <iostream>
#include <cmath>
using namespace std;
//check the lab sheet carefully to ensure your functions behave exactly as specified
//declare distance function
double distance (double x1, double y1, double x2, double y2);
//classify triangles function
int triangleType (double x1, double y1, double x2, doub... | ALGO | 0.998432 | 4.884277 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-08-04T16:11: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": "be3a6e6ade25... |
7560df07-a97d-4a02-a7f1-72d4bffa8807 | spacefarers/cp | problems/cses/intro-18.cpp | // Chessboard and Queens
#include <iostream>
#include <vector>
#include <map>
using namespace std;
vector<char> avails;
map<char, int> mp;
bool visited[7][7];
string a;
int ans=0;
bool inValid(int x, int y){
return x<0||y<0||x>6||y>6||visited[x][y];
}
void dfs(int x, int y, int dep=0){
if (x==6&&y==6){
... | ALGO | 0.998284 | 3.203232 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-01-06T00:20: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": "ed015bb77a... |
b753df2c-2233-4bdd-bf32-db4320d8003f | Pirat3King/data-structures-application | EmployeeList.cpp | // ---------------------------------------------------------------------------
// Project: Web Design Business App
// Description: Header for class EmployeeList - a doubly-linked circular list of Employee objects.
// Author: Pirat3King
// Date: 2023-04-07
// -------------------------------------------------------------... | TOOL | 0.946281 | 7.172985 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-09-10T17:51: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": "d0810e69aeb8... |
48015fbc-77c7-4e65-ab35-fe158f78befe | jainajinkya/Sejong_Dynamic_Control_Toolkit | ControlSystem/Valkyrie/Valkyrie_Controller/ContactSet/DoubleContact.cpp | #include "DoubleContact.hpp"
#include <Robot_Model/RobotModel.hpp>
#include <StateProvider.hpp>
#include <Utils/utilities.hpp>
DoubleContact::DoubleContact(int dim):WBDC_ContactSpec(dim)
{
model_ = RobotModel::GetRobotModel();
sp_ = StateProvider::GetStateProvider();
Jc_ = sejong::Matrix(dim, NUM_QDOT);
}
Doubl... | ALGO | 0.979639 | 4.064609 | {
"github_metadata": {
"branch": "master",
"commit_count": 201,
"repo_created_at": "2017-11-16T23:35:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1847d6d0... |
00568a88-7464-4d2b-bfd3-5f8599bceebc | gbnm2001/asmt1-subtask3-cop290 | method1time.cpp | #include <iostream>
#include <sstream>
#include <fstream>
#include <cstdlib>
#include <cmath>
//#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/video.hpp>
#include "opencv2/opencv.hpp"
#include <opencv2/core/utility.hpp>
u... | ALGO | 0.950533 | 3.747245 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2021-03-25T12:10: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": "369f1574897... |
fe1cf662-483c-4a5c-9845-afdfd0fec7d4 | shubhamkr1/Computer-Vision-1 | part1/watermark.cpp | //
// Watermark.cpp : Add watermark to an image, or inspect if a watermark is present.
//
// Based on skeleton code by <NAME>, Spring 2017
//
// <NAME>, <NAME>, <NAME>
//
//
//Link to the header file
#include <ctime>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <SImage.h>
#include <SImageIO.h>
#i... | TOOL | 0.938896 | 4.456996 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2017-03-17T15:53: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": "41a50dbe70... |
8a8694e1-e120-4d33-883a-d9c1074ef6ec | SR-Sunny-Raj/Hacktoberfest2021-DSA | 15. Binary Search Tree/kth_Smallest_BST.cpp | /* Kth Smallest Number in BST */
/*
For a BST and an integer k,
return the kth smallest value (1-indexed) of all the values
of the nodes in the tree.
Approach:
Simple Idea is to do a depth first search and store in an array and
then print the final answer i.e. kth element.
But the anothe... | ALGO | 0.999996 | 5.786347 | {
"github_metadata": {
"branch": "master",
"commit_count": 2783,
"repo_created_at": "2020-05-08T05:36:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 236,
"forks": 982,
"issues": 3,
"pull_requests": 161
},
"file_meta": {
"content_id": "8... |
198ecb73-524b-44fa-a245-416176c37ecb | vexingcodes/ctsha | ctsha.hpp | /// This is a header-only library allowing compile-time only (consteval) calculation of SHA-1, SHA-224, SHA-256,
/// SHA-384, SHA-512, SHA-512/224, and SHA-512/256 digests as defined in FIPS 180-4. See
/// https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf. All constants are derived from first principles where
... | ALGO | 0.997763 | 4.59517 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-02-13T23:06:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd857c03c8... |
ef411b6a-0789-4cb3-ad7e-8dec3b1446d7 | masc-ucsc/anubis | yosys/passes/techmap/muxcover.cc | /*
* yosys -- Yosys Open SYnthesis Suite
*
* Copyright (C) 2012 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* T... | ALGO | 0.999013 | 6.567856 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2017-06-10T00:18:12.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 12,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "1799d1730... |
eade2ead-82ef-429a-a70d-c450d61f7486 | TantowiPutra/Algorithms-in-C | C++ Concepts/Practice/recursivequiz.cpp | #include <iostream>
using namespace std;
int f(int n) {
static int i = 1;
if(n >= 5)
return n;
n = n + i;
i++;
return f(n);
}
void foo(int n, int sum)
{
int k = 0, j = 0;
if(n == 0)
return;
k %= 10;
j = n / 10;
sum = sum + k;
foo(j, sum);
printf("%... | ALGO | 0.999882 | 3.434842 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2024-04-24T04:32:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5ed99a3dbf5... |
0e9bdfc9-742d-45ca-8f85-f2a1822a1919 | Parrot-Developers/airsdk-samples | road_runner/services/cv_road/src/processing.cpp | /**
* Copyright (c) 2023 <NAME> SAS
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following discl... | ALGO | 0.944927 | 4.605978 | {
"github_metadata": {
"branch": "master",
"commit_count": 140,
"repo_created_at": "2021-05-26T13:47:43.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 6,
"forks": 4,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "70b2ce946... |
8b3c2aaf-af3f-4f1e-bd96-8cebd76a128f | 2013011491/algorithm_practice | cpp_prac/sam4366.cpp | //200218 16:52 start D4 40.30% 17:30 end
//이진법 삼진법 변환의 경우 어느 변환이 가장 효율적인지 생각할것
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
long long twovalue(string binw)
{
long long index=1;
long long ans=0;
for(int i=binw.size()-1; i>=0; --i)
{
if(binw[i]=='1') ans+=index;
... | ALGO | 0.999965 | 4.291802 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2019-09-17T07:39: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": "d1168b8a7... |
d8c13606-d625-40e5-bdf3-f2d9a35fd61c | saikrishna17394/Code | top_coder/600/PalindromeMatrix.cpp | // BEGIN CUT HERE
// END CUT HERE
#line 5 "PalindromeMatrix.cpp"
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>... | ALGO | 0.999978 | 4.719586 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2014-09-25T23:16: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": "47981c379f... |
72bdbd27-8e69-4db8-8461-4acb74e9ccd5 | svn2github/meshlab | meshlab/src/meshlabplugins/filter_voronoi/filter_voronoi.cpp | /****************************************************************************
* MeshLab o o *
* A versatile mesh processing toolbox o o *
* _ O _ *
* Copyri... | TOOL | 0.91117 | 6.171194 | {
"github_metadata": {
"branch": "master",
"commit_count": 6652,
"repo_created_at": "2014-12-17T04:24:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 7,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "6771717... |
e22bc14d-34e2-495b-b6a4-3ccbc374e9cf | Yawn-Sean/Daily_CF_Problems | daily_problems/2025/06/0602/personal_submission/cf529b_yawn_sean.cpp | #include <bits/stdc++.h>
#pragma GCC optimize("O3,Ofast,unroll-loops")
// #include "atcoder/convolution"
// #include "atcoder/dsu"
// #include "atcoder/fenwicktree"
// #include "atcoder/lazysegtree"
// #include "atcoder/math"
// #include "atcoder/maxflow"
// #include "atcoder/mincostflow"
// #include "atcoder/modint"
/... | ALGO | 0.999976 | 4.406087 | {
"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": "c1a8... |
85167cee-0c1a-41a1-8b37-088a11a11846 | HPMkwn/Codding | LinkedList/leetcode/removeNthFromEnd.cpp | #include <bits/stdc++.h>
using namespace std;
struct ListNode {
int val;
ListNode* next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
ListNode(int x, ListNode* next) : val(x), next(next) {}
};
ListNode* removeNthFromEnd(ListNode* head, int n) {
ListNode* for... | ALGO | 0.999996 | 5.057582 | {
"github_metadata": {
"branch": "master",
"commit_count": 112,
"repo_created_at": "2019-10-19T15:12:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 4,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "5acc0bab... |
0515605d-dfe6-444c-90e3-71e494132385 | ShyamJSG/Intern-Task | code.cpp | #include <bits/stdc++.h>
using namespace std;
class wordmagic
{
public:
string letters;
string word;
string engletters;
bool magic(string letters, string word);
string longest(string engletters);
};
bool wordmagic::magic(string letters, string word)
{
string first = letters;
string second ... | ALGO | 0.999785 | 4.055956 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2020-10-27T19:57:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3fabba4afd00... |
9ea1cd32-dc12-49fe-8f7f-bc69d7f78500 | Teomesa/Parcial2 | Imprimir+estructura.h | #ifndef IMPRIMIRESTRUCTURA_H
#define IMPRIMIRESTRUCTURA_H
#include <disp_ofensivo.h>
#include <disp_defensive.h>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#define pi 3.1416
#define G 9.80
using namespace std;
void Imprimir(float angle,float V0of,float x,float y, int t){
cout << "Impacto con un an... | ALGO | 0.98727 | 4.051233 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-12-12T15:21: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": "4e9b71c14e... |
a1bb9a34-3695-4495-8983-af78510cc0d7 | umangja/CompetitiveProgrammingSolution | codeforces/1269/C.cpp | /*input
*/
//assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z) is(65-90) and 32 for space
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define pii pair<ll int,ll int>
#define vpii vector< pii >
#define vi vector<ll... | ALGO | 0.999973 | 3.532412 | {
"github_metadata": {
"branch": "master",
"commit_count": 1167,
"repo_created_at": "2021-02-22T18:28:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d63db56... |
ebaef230-058c-4c1f-acaa-fc13005ffa9c | ishandutta2007/codeforces-z | ztxz16/normal/475/D.cpp | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <map>
#include <vector>
#define Max(a, b) ((FASTBUFFER = ((a) - (b)) >> 31), ((b) & FASTBUFFER | (a) & ~FASTBUFFER))
#define Min(a, b) ((FASTBUFFER = ((a) - (b)) >> 31), ((a) & FASTBUFFER | (b) & ~FASTBUFFER))
#d... | ALGO | 0.999373 | 3.311998 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:43: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": "7511e2595da4... |
f8a6f203-6ea9-4ad5-9a73-85a45d37309c | edwardsCam/Google-Code-Jam-2015 | Dijkstra/main.cpp | #include <fstream>
#include <string>
#include <sstream>
// Dijkstra
class quat {
public:
int sign;
char c;
quat() {
sign = 1;
c = '1';
}
quat (int _s, int _c) {
sign = _s;
c = _c;
}
void reset() {
sign = 1;
c = '1';
}
void times(char q2) {
quat result = getProduct(c, q2);
sign *= result.si... | ALGO | 0.99985 | 3.937738 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2015-04-12T23:17: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": "dada2e7c6c... |
53e28797-8ed7-47b8-996d-3a462d965074 | k0michi/aoj | ALDS1_14_D.cc | #include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <s... | ALGO | 0.999607 | 5.206806 | {
"github_metadata": {
"branch": "main",
"commit_count": 274,
"repo_created_at": "2021-08-31T13: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": "5f2f05598c... |
2548f8e6-3218-4e87-93e5-9b870cee8347 | siddheshsurve/lp3-sem7 | DAA/A3_Knapsack/knapsack.cpp | #include <bits/stdc++.h>
using namespace std;
int max(int a, int b) {
return (a > b) ? a : b;
}
int knapsack(int W, int wt[], int val[], int n) {
vector<vector<int>> K(n+1, vector<int>(W+1));
for(int i=0; i<=n; i++) {
for(int w=0; w<=W; w++) {
if(i == 0 || w == 0) {
... | ALGO | 0.999901 | 4.329932 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-10-12T15: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": "63c11bb9516a... |
15a5814d-940e-4abf-8e1f-0387974c3786 | bhushan2311/Cpp_codes | linked_list.cpp | #include<iostream>
using namespace std;
class node
{
public:
int data;
node *next;
};
node *head=NULL;
void create()
{
node *temp,*n;
temp=new node;
cout<<"enter no. ";
cin>>temp->data;
temp->next=NULL;
if(head==NULL)
{
head=temp;
}
else
{
n=head;
... | ALGO | 0.998485 | 3.83971 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-03-04T17:21: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": "031a244a59... |
a9f1d8a7-f803-46df-a3a3-ab99a8829a98 | Adi1222/Coding-Interview-Preparation | Leetcode/Graph/1020.cpp | /*
1020. Number of Enclaves
Medium
Given a 2D array A, each cell is 0 (representing sea) or 1 (representing land)
A move consists of walking from one land square 4-directionally to another land square, or off the boundary of the grid.
Return the number of land squares in the grid for which we cannot walk off the bo... | ALGO | 0.999892 | 5.872591 | {
"github_metadata": {
"branch": "master",
"commit_count": 308,
"repo_created_at": "2020-10-03T07:33:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b34e9677... |
5e9fb341-8f94-4daa-88bc-23d9b34350a7 | morrischen890717/Leetcode | C++/315_hard.cpp | class Solution {
public:
void merge(vector<int>& nums, vector<int>& id, int start, int mid, int end, vector<int>& counts){
vector<int> left(id.begin() + start, id.begin() + mid + 1);
vector<int> right(id.begin() + mid + 1, id.begin() + end + 1);
int ptrLeft = 0, ptrRight = 0;
int pos... | ALGO | 0.999998 | 6.412378 | {
"github_metadata": {
"branch": "master",
"commit_count": 1286,
"repo_created_at": "2023-03-19T13:24: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": "da26c65... |
0d2ac4ba-96a7-4125-af6e-8441e0d46c30 | sunilsch/IOI-Training | Einführung_Contests/Einfuehrung_Graphen_Kuerzeste_Wege_IOI23/A8_2.cpp | #include <bits/stdc++.h>
#define ll long long
#define pli pair<ll, int>
#define pil pair<int, ll>
#define pii pair<int,int>
#define ve vector
#define vi ve<int>
#define vll ve<ll>
#define vvll ve<vll>
#define vvi ve<vi>
#define vvvi ve<vvi>
#define everyN(var) for(int var = 0; var < n; var++)
#define everyM(var) for(i... | ALGO | 0.999733 | 4.518105 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-12-25T23:13:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "063326f195f2... |
761dd0ec-e20a-46bd-8d33-f0758992448b | carlosxmerca/PED2022 | Queue/LAB4/queue.cpp | // queue.cpp
#include <iostream>
#include <string>
#include "queue.hpp"
using namespace std;
// Implementacion de headers -> queue.hpp
// Funciones de cola
void initialize(Cola *q){
q->frente = NULL;
q->final = NULL;
}
bool empty(Cola *q){
return (q->frente == NULL) ? true : false;
}
T front(Cola *q){
... | ALGO | 0.989505 | 5.089773 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2022-09-22T04:11:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "07121cc3d... |
ab9aa811-923d-42ac-b484-4714d09bcab3 | lhmartin/CPPS | BAPC13/solutions/A/thomas-slow2.cpp | // Solution to Area Coverage
// Author: <NAME>
// Time complexity: O(2^n)
// Memory: O(n)
// @EXPECTED_RESULTS@: TIMELIMIT
// Solution method: inclusion-exclusion
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 1000;
const int L = 1000000;
int X1[N], Y1[N], X2[N], Y2... | ALGO | 0.998941 | 4.50903 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-09-26T17:32:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "25e2d0a2bb... |
4a69ffd0-164c-4350-872d-f2b2b9a1b051 | myunbin/PS | BOJ/20543.cpp | #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
#define fileio() freopen("input.txt","r",stdin); freopen("output.txt","w",stdout)
#define fio() ios_base::sync_with_std... | ALGO | 0.999983 | 4.001667 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2022-05-06T06:26: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": "a69ef8d44... |
81d4e974-b5e8-4e09-ad09-a7a32922711a | CoderHimanshu2002/Codes | theCelebrityProblem.cpp |
bool knows(vector<vector<int>> &M,int a ,int b,int n)
{
if(M[a][b]==1)
return true;
else
return false;
}
public:
//Function to find if there is a celebrity in the party or not.
int celebrity(vector<vector<int> >& M, int n)
{
// code here
... | ALGO | 0.999987 | 5.019108 | {
"github_metadata": {
"branch": "main",
"commit_count": 79,
"repo_created_at": "2024-01-20T06:48: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": "2b375939469... |
42265a77-6012-4a47-ac69-a8447d0a673a | Husainbw786/LeetCode | 0714-best-time-to-buy-and-sell-stock-with-transaction-fee/0714-best-time-to-buy-and-sell-stock-with-transaction-fee.cpp | class Solution {
public:
int solve(int idx,int buy, vector<int>prices, int fee,vector<vector<int>>&dp)
{
if(idx == prices.size())
{
return 0;
}
if(dp[idx][buy] != -1)
{
return dp[idx][buy];
}
if(buy == 1)
{
... | ALGO | 0.999982 | 5.372568 | {
"github_metadata": {
"branch": "main",
"commit_count": 6274,
"repo_created_at": "2022-02-21T04:54: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": "f3e8e9a98... |
29894325-e2ed-4e95-ba76-dc4f6b7b7a69 | radhatumbre/AOA-Practicals | rabinkarp.cpp | #include<bits/stdc++.h>
using namespace std;
#define d 256
void rabinkarp(char txt[], char pat[], int q){
int n = strlen(txt);
int m = strlen(pat);
int p = 0; // hash value for pattern
int t = 0; // hash value for txt
int h = 1;
int i,j;
// this one is important "i < m-1"
for (i ... | ALGO | 0.999965 | 5.150269 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-04-27T12:15:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d24693fb6fb6... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.