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 |
|---|---|---|---|---|---|---|---|
b8695cb6-2e66-4ee5-84bb-074005937bf3 | Mulab11/cntt2016-hw1 | TC-SRM-587-div1-900/yjq.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m ;
const int MAXN = 10010 ;
struct Edge {
int l, r, c, nxt;
} e[MAXN << 1] ;
bool flag = 1 ;
int ecnt = 0, hed[MAXN] ;
void addedge(int l, int r, int c) {
++ecnt, e[ecnt].l = l, e[ecnt].r = r, e[ecnt].c = c, e[ecnt].nxt = hed[l], hed[l] = ecnt ; ... | ALGO | 0.999958 | 4.320382 | {
"github_metadata": {
"branch": "master",
"commit_count": 4450,
"repo_created_at": "2016-09-28T13:04:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 31,
"forks": 28,
"issues": 0,
"pull_requests": 8
},
"file_meta": {
"content_id": "d61c6... |
bc15a38c-e902-4689-b893-162a24508904 | hassenok/Algorithms-and-data-structure | ADS_P5/Graphsearch.h | #pragma once
#include "EdgeWeightedDigraph.h"
#include "EdgeWeightedGraph.h"
#include <iostream>
#include<queue>
using namespace std;
namespace Graphsearch {
/**
* Fuehrt eine rekursive Tiefensuche im Graphen G,
* ab dem Knoten v aus und markiert alle besuchten
* Knoten in marked.
* Alle besuchten Knoten werd... | ALGO | 0.998497 | 5.642238 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2022-11-16T18:04:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d72262c4c3d... |
c734b48c-2c6f-4c98-a2a1-81a009cd31e6 | omgimanerd/experimental | python_encryption/single_file/encrypt.cpp | /**
* File: encrypt.cpp
* Author: <NAME> (<EMAIL>)
* Single file encryption.
* Created on July 23, 2013, 7:05 PM
*/
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
template ... | TOOL | 0.970283 | 4.092392 | {
"github_metadata": {
"branch": "master",
"commit_count": 271,
"repo_created_at": "2015-07-22T17:48: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": "0b411305... |
6e27fb3d-1960-4e43-a499-e39d59d481db | Gaius-Augustus/Augustus | src/meaPath.cc | /*
* meaPath.cc
*
* License: Artistic License, see file LICENSE.TXT or
* https://opensource.org/licenses/artistic-license-1.0
*/
#include <iostream>
#include "graph.hh"
#include "meaPath.hh"
using namespace std;
void MEApath::findMEApath(){
getTopologicalOrdering();
graph->addBackEdges();
rela... | ALGO | 0.999844 | 3.00415 | {
"github_metadata": {
"branch": "master",
"commit_count": 2716,
"repo_created_at": "2018-05-24T17:34:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 313,
"forks": 115,
"issues": 162,
"pull_requests": 7
},
"file_meta": {
"content_id": "d6... |
9f0ce288-3f62-4c09-a018-eff2badd40c4 | Kiedyffiy/C-language-programming | test/归并1.cpp | #include "fuckyou.h"
template <class T>
void merge(int ll, int rr,T& a){
// if (rr - ll <= 1){
// if((a[rr]<a[ll]))
// std::swap(a[rr],a[ll]);
// return;
// }
int mid = ll + (rr - ll >> 1);
if(rr-ll!=0){
merge(ll, mid, a);
merge(mid, rr, a);}
int p = ll, q = mid, s = ll;
int t[1000];
while (s < ... | ALGO | 0.999849 | 4.34762 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-11-15T13:18:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5abb62c1f635... |
9b160092-2901-4e6e-9249-ef3532814d80 | SecurityQQ/CPlusPlus_MIPT_Algorithms | NaiveBST/NaiveBST/main.cpp | //
// main.cpp
// NaiveBST
//
// Created by <NAME> on 09.04.15.
// Copyright (c) 2015 SecurityQQ. All rights reserved.
//
#include <iostream>
#include "NaiveBST.h"
int compFunc(const int a, const int b) {
return a - b;
}
int main(int argc, const char * argv[]) {
NaiveBST<int> bst(compFunc);
char ch;
... | ALGO | 0.995221 | 4.369929 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-10-09T08:59:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ba9720437b... |
a551a39c-c7f7-4f1f-8633-b3d4f0fc9aff | ngthanhtrung23/CompetitiveProgramming | codeforces/173/C.cpp | //#pragma comment(linker, "/STACK:66777216")
#include <iomanip>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <string>
#include <deque>
#inclu... | ALGO | 0.999988 | 3.23403 | {
"github_metadata": {
"branch": "master",
"commit_count": 4554,
"repo_created_at": "2019-04-04T14:21:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 90,
"forks": 17,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97ac2... |
5fd03f4f-5cfc-46d1-8d87-74f0de2a726b | VidevichA/algs-4-sem | Специальные структуры данных/Индивидуальные/Problem 64. Клинок духа/[OK]731685.cpp | #include <iostream>
#include <cmath>
#include <vector>
using namespace std;
int MOD = pow(10, 9) + 7;
long long fact[100000];
void initFact(int n)
{
fact[0] = 0;
long long ans = 1;
for (int i = 1; i <= n; i++)
{
ans = ((ans % MOD) * (i % MOD)) % MOD;
fact[i] = ans;
}
}
void upda... | ALGO | 0.999976 | 4.284341 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2023-04-22T16:31:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "41d94df0d... |
05d74fbf-cc37-442c-af03-c1643499a984 | edwu0029/Mesh-Renderer-Cpp | src/matrix.cpp | #include "matrix.h"
// ------------- For mat3d class -------------
mat3d::mat3d(){
for(int i = 0;i<3;i++){
for(int j = 0;j<3;j++){
m[i][j] = 0.0;
}
}
}
mat3d::mat3d(double in[3][3]){
for(int i = 0;i<3;i++){
for(int j = 0;j<3;j++){
m[i][j] = in[i][j];
... | TOOL | 0.956949 | 4.371867 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2024-12-24T21:55:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "200605021e1... |
5c2926cd-db6d-460f-8f88-05b264657521 | NekoPii/Csource | fibnacci最终版本/fibnacci最终版本/src.cpp | #include<iostream>
using namespace std;
const int maxbit = 2000;
int tmp[3][maxbit] = { 0 };
int main()
{
int n;
char result[maxbit] = { '\0' };
memset(tmp, 0, sizeof(tmp));
cin >> n;
if (n <= 0) return 0;
else
{
tmp[0][0] = 1;
tmp[1][0] = 1;
tmp[2][0] = 2;
int i, t;
int num = 0;
for (i = 0; i < n -... | ALGO | 0.999947 | 3.714943 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-05-03T11:19: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": "2dcdc43978... |
e2418c42-d3ca-4594-acc1-d4987142b34b | guravtushar/LeetCode | May Challenge/Day_7_Cousins_in_Binary_Tree.cpp | /*
In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1.
Two nodes of a binary tree are cousins if they have the same depth, but have different parents.
We are given the root of a binary tree with unique values, and the values x and y of two different nodes in the tree.
R... | ALGO | 0.999979 | 6.144706 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2020-05-05T13:42: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": "baf7410b4... |
75cf6bc4-540e-4c36-a31b-7113fd0af242 | tablopart2/DERIV_SHB | SingleOption/ext/k_MonteCarlo.cpp |
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cmath>
#include <new>
#include <algorithm>
#include <ios>
#include "kdb_MonteCarlo.hpp"
#include "kdb_miscellaneous.hpp"
#include "kdb_probability.hpp"
#include "kdb_BasicMath.hpp"
using namespace std;
//============================================... | ALGO | 0.995567 | 3.694202 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2020-06-12T05:17: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": "e76e0108e... |
0e012cbe-fc00-410b-b06f-64d6c131b329 | colmap/colmap | src/colmap/estimators/generalized_absolute_pose.cc | // Copyright (c), ETH Zurich and UNC Chapel Hill.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, th... | TOOL | 0.973702 | 7.17746 | {
"github_metadata": {
"branch": "main",
"commit_count": 2214,
"repo_created_at": "2014-08-16T00:55:31.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8989,
"forks": 1696,
"issues": 1026,
"pull_requests": 34
},
"file_meta": {
"content_id": "... |
9a02e52e-35b9-47db-9437-fff15f43002c | Nepetalactone/S3VR | S3ObjectDetector_cpp/ConsoleApplication1/S3ObjectDetector.cpp | #include "stdafx.h"
#include <stdio.h>
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/nonfree/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
using namespace cv;
... | ALGO | 0.92805 | 4.415469 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2014-04-11T09:16:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0ef8aa1c... |
f455d08e-671c-446c-b094-6c22d83a728e | apopelinov/Rid-solomon | solomon/RidSolomonG255.cpp | #include <iostream>
using namespace std;
int* IDFTtestG255(int* numberArray, int size)
{
int* resultArray = new int[size] {127, 230, 21, 57, 5, 192};
/*int* resultArray = new int[size];
int sum;
int step = 5;
int pow = 1;
for (int i = 0; i < size; i++) //цикл по перебору номера элемента
{
sum = 0;
for (int j... | ALGO | 0.999831 | 3.291127 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-06-08T22:53: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": "fa715ca021... |
bea95670-30d8-4b0e-8184-1e1e48e21780 | dreamzen/leetcode | rotate-image-2nd.cpp | #include <iostream>
#include <vector>
using namespace std;
/**
* (x, y) ==> (y, n-1-x)
* (x, y) <== (n-1-y, x)
* Take care of the order!
*/
class Solution
{
public:
void rotate(vector<vector<int> > &matrix)
{
int n = matrix.size();
if(n <= 1)
{
return;
}
... | ALGO | 0.999964 | 5.418021 | {
"github_metadata": {
"branch": "master",
"commit_count": 211,
"repo_created_at": "2014-03-17T01:06: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": "9197e368... |
c113dcb8-f04b-4b73-ad1d-8591ddcf21a9 | TJ-CSCCG/TJCS-Course | 100417_现代密码学课程设计/tools/Windows_NTL_11_4_3/src/G_LLL_XD.cpp |
#include <NTL/LLL.h>
#include <NTL/fileio.h>
#include <NTL/vec_xdouble.h>
#include <NTL/vec_double.h>
NTL_START_IMPL
static void RowTransform(vec_ZZ& A, vec_ZZ& B, const ZZ& MU1)
// x = x - y*MU
{
NTL_ZZRegister(T);
NTL_ZZRegister(MU);
long k;
long n = A.length();
long i;
MU = MU1;
if (MU =... | ALGO | 0.998809 | 4.85574 | {
"github_metadata": {
"branch": "master",
"commit_count": 212,
"repo_created_at": "2020-06-21T09:01:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 326,
"forks": 20,
"issues": 3,
"pull_requests": 1
},
"file_meta": {
"content_id": "ad6785... |
c2cfe540-749e-498c-b3fd-7d56a3e71071 | cho2405/problem | LG/2018_1_pipe_new.cpp | #include <iostream>
using namespace std;
int N;//정사각형 지도 크기
int X, Y;//수돗물 공급되는 시작 좌표, 가로, 세로
int map[20][20] = {-1,};//지도 정보
int w[12][4] = {
{0,0,0,0},
{0,0,1,1},
{1,1,0,0},
{0,1,0,1},
{0,1,1,0},
{1,0,1,0},
{1,0,0,1},
{1,1,0,1},
{0,1,1,1},
{1,1,1,0},
{1,0,1,1},
{1,1,1... | ALGO | 0.999952 | 4.045957 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2018-03-09T01:47: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": "dd69623df2... |
936bf97a-df48-4288-a815-30805d5a416e | laylow13/param_estimator | src/param_estimator/src/test_ideal_sim.cpp | //
// Created by lay on 24-3-7.
//
//
// Created by lay on 24-3-1.
//
#include "EKF_estimator/EKF_estimator.h"
#include <iostream>
Vector3d random_M() {
Vector3d ret;
ret << rand() % 2 - 1, rand() % 2 - 1, rand() % 2 - 1;
return ret;
}
Vector3d sin_M(int i) {
Vector3d ret;
ret << sin(i * 0.01), 1,... | ALGO | 0.950376 | 5.047225 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2024-02-24T05:58: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": "979dcf5467... |
4eb286af-6e2d-40ce-80da-d3581fdeba84 | kz04px/autaxx | src/autaxx/search/nnue/search.cpp | #include <array>
#include <cassert>
#include <chrono>
#include <iostream>
#include "accumulator.hpp"
#include "nnue.hpp"
#include "phase.hpp"
#include "reduction.hpp"
#include "sorter.hpp"
constexpr std::array<int, 4> futility_margins = {257, 347, 478, 774};
using namespace std::chrono;
namespace search::nnue {
[[n... | ALGO | 0.99988 | 6.529908 | {
"github_metadata": {
"branch": "master",
"commit_count": 140,
"repo_created_at": "2019-10-03T13:08:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0bc3f921... |
8628f352-5e8c-4ac5-9098-e9caf8fb387d | Vequis/Competitive-Programming | CF/CF1033/B.cpp | #include<bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define sz(x) (int)(x).size()
#define pb push_back
#define eb emplace_back
#define vi vector<int>
#define all(x) (x).begin() , (x).end()
#define fs first
#define sc second
#define ii pair<int, int>
#define vii vector<ii>
#define ... | ALGO | 0.999794 | 3.981614 | {
"github_metadata": {
"branch": "main",
"commit_count": 67,
"repo_created_at": "2024-02-01T16:09:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a40d0efff9b... |
28a73bbe-3d26-4985-9071-bfd4b9f7ef92 | Abiesjqq/MathModules | draft2.cpp | #include <bits/stdc++.h>
using namespace std;
struct task {
char priority;
int x, y, num;
};
struct candidate {
vector<pair<int, int>> assignment;
int cost;
};
struct position_coord {
int x, y;
};
struct UAV {
position_coord position;
int remain_power;
};
struct obstacle {
position_... | ALGO | 0.999789 | 3.957239 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2025-05-10T15:21: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": "8f3e3a9607b... |
aaba8f8c-6cb0-40f0-961a-65a9300df73b | dr0pdb/competitive | codeforces/july-2019/461b.cpp | #include<bits/stdc++.h>
#define FOR(i,a,b) for(long long i = (long long)(a); i < (long long)(b); i++)
#define RFOR(i,a,b) for(long long i = (long long)(a); i >= (long long)(b); i--)
#define MIN3(a,b,c) (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c))
#define MAX(a,b) (a)>(b)?(a):(b)
#define MIN2(a,b) (a)<(b)?(a):(b)
using n... | ALGO | 0.999948 | 3.802492 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2017-02-15T19:13:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "28ce22fa7... |
1bcc9d39-894e-4ade-a40e-b4ee0b035e01 | loplio/NeonSurvival | Server/test/MyMath.h | #pragma once
#include <DirectXMath.h>
#include <DirectXPackedVector.h>
#include <DirectXColors.h>
#include <DirectXCollision.h>
using namespace DirectX;
using namespace DirectX::PackedVector;
#define EPSILON 1.0e-10f
#define METER_PER_PIXEL(num) num * 10 // 1meter 10pixel~50pixel
inline bool IsZero(float fValue) { ... | TOOL | 0.929936 | 5.749681 | {
"github_metadata": {
"branch": "master",
"commit_count": 216,
"repo_created_at": "2023-02-21T19:28:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6f9a23ec... |
d55d4f80-d11d-4f2d-81e4-b49c6b28ecd2 | rsenwar/cses-solutions | cses-1709.cpp | #include<bits/stdc++.h>
using namespace std;
int adj[500+1][500+1];
int rAdj[500+1][500+1];
vector<int> par(500+1, -1);
vector<bool> vis;
int n, m;
bool bfs(int src, int dest) {
vis = vector<bool>(501, 0);
queue<int> q;
q.push(src);
vis[src] = true;
while(!q.empty()) {
int tp = q.front... | ALGO | 0.999855 | 3.247879 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-01-12T12:19: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": "7d52b0b114e2... |
59178ea2-f3ce-4894-9207-2646a8b998f4 | wolftender/sfsw-proj | src/scenes/gel.cpp | #include <iostream>
#include <array>
#include <ranges>
#include <random>
#include <glm/gtc/matrix_transform.hpp>
#include "gui.hpp"
#include "scenes/gel.hpp"
namespace mini {
constexpr std::array<glm::vec3, 8> cube_points = {
glm::vec3{ -1.0f, -1.0f, 1.0f },
glm::vec3{ -1.0f, -1.0f, -1.0f },
glm::vec3{ -1.0f,... | ALGO | 0.980004 | 4.968516 | {
"github_metadata": {
"branch": "master",
"commit_count": 109,
"repo_created_at": "2023-10-12T22:23: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": "aae36a1c... |
8450a731-831f-43d3-a123-9d99398636f3 | MinhThoai-wt/Embedded_Enterview_T5 | Buoi17_BaiTap/BaiTap4/Source/BaiTap4.cpp | #include <iostream>
#include <string>
using namespace std;
class DongVat {
private:
string TEN;
int TUOI;
float TrongLuong;
float ChieuCao;
public:
DongVat(string Ten, int Tuoi, float trong_luong, float chieu_cao);
float Tinh_BMI();
void SoSanh_Tuoi(DongVat other1, DongVat other2);
vo... | TOOL | 0.987072 | 4.087558 | {
"github_metadata": {
"branch": "main",
"commit_count": 175,
"repo_created_at": "2023-05-16T14:20: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": "6e3176a367... |
bdd73327-2551-4b67-932e-35575972ce2e | ishandutta2007/codeforces-d | deemo/normal/29/A.cpp | /*
All systems go, sun hasn't died
deep in my bones, straight from inside..
*/
#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<deque>
#include<set>
#include<map>
#include<string>
#include<utility>
#include<iomanip>
#include<fstre... | ALGO | 0.999933 | 3.633569 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bc5cda7f2fb3... |
9de5f035-17c8-432e-a4c1-27dac0bd9cff | rjenez/W266-final-project | data/programming-homework-dataset-plagiarism-detection/src/B2017/Z2/Z2/student6018.cpp | /*B 2017/2018, Zadaća 2, Zadatak 2 */
#include <iostream>
#include <vector>
#include <deque>
#include <iomanip>
#include <stdexcept>
#include <algorithm>
#include <deque>
enum class SmjerKretanja {
NaprijedNazad, NazadNaprijed, GoreDolje, DoljeGore, LijevoDesno, DesnoLijevo
};
template <typename matrica>
matrica ... | ALGO | 0.990691 | 5.280541 | {
"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": "c5cd982414... |
2c0fb82d-014d-4b13-a487-163bcb49a455 | rharriso/Introduction-to-Operating-Systems | priority-reader-writer/main.cpp | #include <stdio.h>
#include <pthread.h>
#define NUM_THREADS 100
pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t read_phase = PTHREAD_COND_INITIALIZER;
pthread_cond_t write_phase = PTHREAD_COND_INITIALIZER;
int resourceCounter = 0;
int readerCount = 0;
int dataToWrite = 0;
void* readFunc(voi... | ALGO | 0.996991 | 5.054674 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-07-25T01:32: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": "308b6f67bc... |
cbc62c5c-57fd-4176-96b8-d0eda37b1269 | ivankra/acm | test-the-best.by/ttb-20060927/B.cc | #include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
using namespace std;
typedef long long int64;
int P[10000];
vector<vector<int> > adj;
int solve(int x, ... | ALGO | 0.999606 | 4.167337 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2010-01-03T06:51:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 118,
"forks": 43,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "4cd231... |
72cefb5e-1d42-4256-8502-a29cd563586e | BioMedIA/MIRTK | Modules/Registration/src/RegistrationEnergyParser.h | /*
* Medical Image Registration ToolKit (MIRTK)
*
* Copyright 2013-2017 Imperial College London
* Copyright 2013-2017 <NAME>
*
* 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
*
* ... | TOOL | 0.954207 | 5.930788 | {
"github_metadata": {
"branch": "master",
"commit_count": 2061,
"repo_created_at": "2016-01-03T22:25:55.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 197,
"forks": 71,
"issues": 64,
"pull_requests": 3
},
"file_meta": {
"content_id": "07b8... |
ed1550ea-8ff5-4671-bb07-39d936293bde | JiahuiTao/CppProjects | 3.Fractals/fractals.cpp | #include "fractals.h"
#include <cmath>
#define PI 3.14159265
using namespace std;
const int LEAF_COLOR = 0x2e8b57; /* Color of all leaves of recursive tree (level 1) */
const int BRANCH_COLOR = 0x8b7765; /* Color of all branches of recursive tree (level >=2) */
/**
* Draws a Sierpinski triangle of the specified s... | ALGO | 0.993352 | 5.535649 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-05-12T20:48:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d9224fc6... |
d2fec732-191e-4685-98ce-13cf2537f55c | thomasp85/boundaries | src/corner_clip.cpp | #include <vector>
#include <utility>
#include <cpp11/declarations.hpp>
#include <cpp11/integers.hpp>
#include <euclid.h>
#include <polyclid.h>
#include <list>
struct Edge {
Point_2 source;
double length;
bool corner;
double cut_dist_back;
double cut_dist_forward;
};
std::vector<Point_2> cut_corners(std::... | ALGO | 0.999833 | 6.591778 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-01-26T14:32:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0fd391fe40... |
d70d79d0-7ef1-41b9-b2b5-4f4e0ea6b117 | SyncShinee/ACM-ICPC | ACMContest/BUAASummerPractice/Week1/J.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <bitset>
#define N 200010
using namespace std;
char s[N], t[N];
bitset<N> bt[4], ans;
int pre[4];
int main() {
int n, m, k;
scanf("%d%d%d", &n, &m, &k);
scanf("%s%s", s, t);
pre[0] = pre[1] = pre[2] = pre[3] = -N;
for (int i = 0... | ALGO | 0.999706 | 3.492298 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2015-05-07T06:24:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "597c7009e... |
4bb45528-d26f-43e1-8821-e341d120eb28 | Sudhir878786/MyLeetCode_Solutions | Max Sum without Adjacents 2 - GFG/max-sum-without-adjacents-2.cpp | //{ Driver Code Starts
//Initial Template for C++
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function Template for C++
class Solution{
public:
int solve(int i, int limit, vector<int>& a, vector<vector<int>> &dp)
{
if(i>=a.size())return 0;
if(dp[i][li... | ALGO | 0.999706 | 5.587251 | {
"github_metadata": {
"branch": "Sudhir",
"commit_count": 2704,
"repo_created_at": "2022-05-30T12:33:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6bc65a8... |
5489434b-bbad-4586-9579-5265584f4135 | drajtor/pathfinderGame | main.cpp | #include <iostream>
#include <utility>
#include <cstdlib>
#include "pathfinder.h"
#include "map_generator.h"
#include "Imap_drawer.h"
#include "map_text_drawer.h"
#include <memory>
#include <csignal>
#include <sys/wait.h>
void handle_signal(int sig){
if (sig == SIGTSTP){
exit(0);
}
}
void run_gui(){
... | TOOL | 0.961044 | 4.490028 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2024-05-03T10:08: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": "a288763d0d... |
d1838a8e-4e70-4c83-aaed-208e61833edb | ksi2021/cPlusPlus | functions.cpp | #include <iostream>
#include <array>
#include <vector>
#include <sstream>
#include <math.h>
using namespace std;
// {1} В предыдущих домашних заданиях найти блоки кода, которые возможно выделить в функции и определить их в функции
int getRandom(int min, int max)
{
return min + rand() % (max - min + 1);
}
/*
{... | TOOL | 0.944147 | 3.562119 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-01-28T11:36: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": "b68edf1bdb67... |
6e9132ec-6af0-4672-b67d-c0d76c3c39b3 | taketo-44/competitive | atcoder/abc/abc204/e/main.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const long long INF=1e18;
ll find(ll D, ll t){
ll ret = INF;
ll d = (ll)(sqrt((double)D))-1LL;
ll cur = max(t, d);
for(ll i=0;i<=3;i++){
ret = min(ret, D/(cur+i+1LL)+cur+i);
}
return ret;
}
int main(){
int N, M;
cin >> N >> M;
l... | ALGO | 0.999928 | 3.781945 | {
"github_metadata": {
"branch": "main",
"commit_count": 90,
"repo_created_at": "2023-06-09T16:11: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": "f9979b29b12... |
2ab4e38c-df32-4dfc-b7dd-a95c27f502c8 | MatteoBouvier/aoc | 2024/src/day4/part2.cpp | #include <cstdio>
#include <iostream>
#include <string>
#include <vector>
struct Position {
int x, y;
};
int main() {
std::vector<std::string> lines = {};
std::vector<Position> A_pos = {};
int count = 0;
int line_nb = 0;
for (std::string line; getline(std::cin, line);) {
if (line_nb >... | ALGO | 0.999124 | 4.200994 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2023-12-01T17:00: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": "f6cbe4505a2... |
697bcfcc-fb15-4481-923b-cb4b1f7b396c | prerit1501/CodeForces | Ladder/Codeforces Rating < 1300/1.cpp | #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#incl... | ALGO | 0.999764 | 4.387507 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-02-11T20:59: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": "d075008cdc... |
a12d6f00-ed06-49ec-8de9-38f2828dc338 | ParkDaeYi/Algorithm_Study | 5573.cpp | #include <iostream>
using namespace std;
int H, W, N, arr[1001][1001], dp[1002][1002];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
cin >> H >> W >> N;
for (int i = 1; i <= H; ++i) for (int j = 1; j <= W; ++j) cin >> arr[i][j];
// dp 배열엔 경우의 수를 저장
// 홀수일 경우에는 한 번 더 이동하므로 + 1
dp[1][1] ... | ALGO | 0.99996 | 4.115692 | {
"github_metadata": {
"branch": "master",
"commit_count": 549,
"repo_created_at": "2020-02-13T05:39: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": "dc38045a... |
aeb1a42d-732c-4dc5-9426-0b7ae2971cdc | siconos/siconos-tutorials | examples/mechanics/FrictionOscillator/FrictionOscillator.cpp | #include "SiconosKernel.hpp"
#include <math.h>
#include "SolverOptions.h"
using namespace std;
// main program
#include <chrono>
int main(int argc, char* argv[])
{
// Exception handling
try
{
// == User-defined parameters ==
unsigned int ndof = 2; // number of degrees of freedom of your system
do... | ALGO | 0.99803 | 4.516958 | {
"github_metadata": {
"branch": "master",
"commit_count": 989,
"repo_created_at": "2018-10-09T13:26:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a39fa4f5... |
13fc08c9-71aa-4524-9335-2478a08d8d4a | KhaledHegazy222/Problem-Solving | SPOJ/KQUERY/main2.cpp | /*
Created By : <NAME>
*/
#include <bits/stdc++.h>
#define fast cin.tie(0),ios::sync_with_stdio(0),cout.tie(0)
using namespace std;
const int N = 1 << 15;
int n;
vector<int>tree[N << 1];
int arr[N];
void build(int ni = 0,int ns = 0,int ne = n - 1){
if(ns == ne){
tree[ni].push_back(arr[ns]);
return;
}
in... | ALGO | 0.999987 | 5.601435 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-01-16T18:13:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d6ee5c367267... |
6e8528ea-25db-4b8d-b9a9-04ffc07f6dcf | rjsnhk/CSE205_DSA | UNIT 4/LEC 26/Sarah managing students' exam scores Inorder.cpp | #include <stdio.h>
#include <stdlib.h>
struct Node
{
int data;
struct Node* left;
struct Node* right;
};
struct Node* root = NULL;
struct Node* temp;
struct Node* createNode(int input)
{
struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
newNode->data = input;
newNode->left = N... | ALGO | 0.999986 | 4.50593 | {
"github_metadata": {
"branch": "main",
"commit_count": 64,
"repo_created_at": "2023-09-29T06:14: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": "10786673095... |
c18b4695-32c2-4d03-bb6c-30636df85ef0 | stan-dev/math | stan/math/opencl/prim/binomial_logit_glm_lpmf.hpp | #ifndef STAN_MATH_OPENCL_PRIM_BINOMIAL_LOGIT_GLM_LPMF_HPP
#define STAN_MATH_OPENCL_PRIM_BINOMIAL_LOGIT_GLM_LPMF_HPP
#ifdef STAN_OPENCL
#include <stan/math/opencl/prim/size.hpp>
#include <stan/math/opencl/rev/operands_and_partials.hpp>
#include <stan/math/opencl/copy.hpp>
#include <stan/math/opencl/prim/multiply.hpp>
#... | ALGO | 0.992798 | 6.879899 | {
"github_metadata": {
"branch": "develop",
"commit_count": 28933,
"repo_created_at": "2015-07-01T18:40:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 785,
"forks": 195,
"issues": 298,
"pull_requests": 19
},
"file_meta": {
"content_id": ... |
0e7fe1ed-1481-4650-95f4-c9cf497633f5 | lostpigxx/lifetime | learn/algorithm/topK.cpp | /*
* TopK问题的多种解
*/
#include <iostream>
#include <vector>
#include <random>
#include <time.h>
using namespace std;
class TopK {
public:
vector<int> TopK_sort(const vector<int>& v, int k);
vector<int> TopK_partial_sort(const vector<int>& v, int k);
vector<int> TopK_heap(const vector<int>& v, int k)... | ALGO | 0.999877 | 5.716069 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2016-03-21T06:03: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": "94cc67712... |
1e78cb83-b3fe-4ce5-b354-8a4cbe41a0a8 | triggthediscovery/thingy | driver.cpp | #include "BST.h"
#include <math.h>
#include <fstream>
#include <chrono>
#include <deque>
#include <vector>
#include <cmath>
using namespace std;
#define nodes 10000
#define micro 1000000
typedef std::chrono::high_resolution_clock Time;
typedef std::chrono::duration<float> fsec;
template <typename element>
element* b... | TEST | 0.977729 | 4.406029 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2016-11-08T22:08:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "024175c73... |
d174c974-82c3-48e8-9657-0af258013097 | Nikita0331/code-for-hacktoberfest | Array&String/array_intersection.cpp | /* :)
You have been given two integer arrays/list(ARR1 and ARR2) of size N and M, respectively. You need to print their intersection; An intersection for this problem can be defined when both the arrays/lists contain a particular value or to put it in other words, when there is a common value that exists in both the ar... | ALGO | 0.999943 | 4.342726 | {
"github_metadata": {
"branch": "main",
"commit_count": 152,
"repo_created_at": "2022-10-15T13:46:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 25
},
"file_meta": {
"content_id": "1572f6057... |
c45c20ef-fe04-41dd-8a2f-0ee91f2343b5 | ji1dev/algorithm | BOJ/11404.cpp | // 11404번_플로이드
#include <iostream>
#include <algorithm>
#define F_IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define INF 987654321
using namespace std;
int n, m, path[101][101];
void floyd(){
for(int k=1; k<=n; ++k){
for(int i=1; i<=n; ++i){
for(int j=1; j<=n; ++j){
... | ALGO | 0.999997 | 4.225364 | {
"github_metadata": {
"branch": "main",
"commit_count": 455,
"repo_created_at": "2021-02-03T08:41: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": "fcb183b8d6... |
8f699488-7acd-45c1-8f03-83fe027e8371 | InsightSoftwareConsortium/ITK | Modules/Core/Common/include/itkMatrix.hxx | /*=========================================================================
*
* Copyright NumFOCUS
*
* 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
*
* https://www.apache.o... | ALGO | 0.954923 | 6.543472 | {
"github_metadata": {
"branch": "main",
"commit_count": 57165,
"repo_created_at": "2010-07-27T15:48:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1517,
"forks": 701,
"issues": 268,
"pull_requests": 49
},
"file_meta": {
"content_id": "3... |
9f7ca168-d5d8-487d-b9b9-43251e3ad4fa | jcpince/algorithms | leetcode/permutations.cpp | /*
46. Permutations
Medium
Given a collection of distinct integers, return all possible permutations.
Example:
Input: [1,2,3]
Output:
[
[1,2,3],
[1,3,2],
[2,1,3],
[2,3,1],
[3,1,2],
[3,2,1]
]
*/
#include <bits/stdc++.h>
//#define DEBUG 1
#undef DEBUG
#include <TreeNode.h>
#include <UnitTests.h>
#include <TestsHelp... | ALGO | 0.999336 | 6.301744 | {
"github_metadata": {
"branch": "master",
"commit_count": 72,
"repo_created_at": "2019-06-22T08:50: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": "1d2b474ca... |
397c9a23-9de5-4118-9ed3-83ca50374e1a | macko99/ASD | II/mirrosTrees.cpp | #include <iostream>
using namespace std;
struct node
{
node *parent;
node *left;
node *right;
int val;
};
node *createNode (int val)
{
node *nowy = new node;
nowy->parent = nullptr;
nowy->left = nullptr;
nowy->right = nullptr;
nowy->val = val;
return nowy;
}
void insert (node *&t... | ALGO | 0.999976 | 4.321197 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-12-11T23:38: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": "b3c5cdeb60... |
090eea8f-52d2-478a-a6c8-f2a3d974c40b | joopedriantos/GCC-Tasks | Sábado_03-15_T1-Caio/1555.cpp | //<NAME>
#include <iostream>
using namespace std;
int rafael(int x, int y) {
return (3 * x) * (3 * x) + (y * y);
}
int beto(int x, int y) {
return 2 * (x * x) + (5 * y) * (5 * y);
}
int carlos(int x, int y) {
return -100 * x + (y * y * y);
}
int main() {
int N;
cin >> N;
while (N--) {
... | ALGO | 0.999974 | 4.063026 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2025-02-22T15:34: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": "37c7e918d40... |
33db9f9f-55ff-443c-9f37-c045e1d660b1 | irfanekon04/Phitron | 1.2 C++ for DS/8 Final Exam/Reverse_It.cpp | #include <bits/stdc++.h>
using namespace std;
class Student
{
public:
string nm;
int cls;
char s;
int id;
};
int main()
{
int n;
cin >> n;
Student a[n];
for (int i = 0; i < n; i++)
{
cin >> a[i].nm >> a[i].cls >> a[i].s >> a[i].id;
}
Student temp;
temp.s = 'A';
... | ALGO | 0.999307 | 3.089911 | {
"github_metadata": {
"branch": "main",
"commit_count": 103,
"repo_created_at": "2024-04-01T20:57: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": "49a2d62fe7... |
a0d17fa5-2c67-4c11-bd8d-480e4cdb0477 | biotomas/ipasir | app/genipafolio/genipafolio.cpp | /* Author: <NAME>, KIT, Karlsruhe */
#include <stdio.h>
#include <stdlib.h>
#include "Threading.h"
#include <algorithm>
#include <vector>
#include <ctype.h>
// The linked SAT solver might be written in C
// while this application is written in C++
extern "C" {
#include "ipasir.h"
}
using namespace std;
// Parse a d... | ALGO | 0.99923 | 5.113945 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2017-05-04T07:26:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 50,
"forks": 14,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "60d588c... |
d0a8e9fc-7eea-414d-ad48-8c206fb55a67 | jonb808/462_Ai_shootout | scratchAstar/RobotPlayer.cxx | /* bzflag
* Copyright (c) 1993-2018 <NAME>
*
* This package is free software; you can redistribute it and/or
* modify it under the terms of the license found in the file
* named COPYING that should have accompanied this file.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIE... | ALGO | 0.913714 | 4.565346 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-04-15T05:34: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": "5a94844cd5... |
59f7d148-41e1-40f7-bdab-7b04c5c2b26a | Karmah24/Algorithms | Stacks_Queues/min_max_stack.cpp | #include <bits/stdc++.h>
using namespace std;
class MinStack {
public:
stack<int> stack;
int min;
void push(int x) {
if (stack.empty()) {
min = x;
stack.push(x);
}
else {
if (x < min) {
stack.push(2LL * x - min);
mi... | ALGO | 0.99768 | 4.648933 | {
"github_metadata": {
"branch": "main",
"commit_count": 77,
"repo_created_at": "2021-05-11T18:06: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": "bfef8f33ee9... |
d06f143b-c989-47a0-9272-b999fa70fc6f | CeliaPe/Cpp | PruebaPersona.cpp | #include <iostream>
#include <vector>
using namespace std;
void imprimirVector(vector<int> v){
for (int i = 0 ; i < v.size() ; i++){
cout << v[i] << " ";
}
cout << endl;
}
class Persona{
private:
string nombre;
string dni;
int edad;
bool vip;
public: //private:
bool esMultiplo(int nu... | TOOL | 0.933501 | 3.648793 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2022-01-18T21:20:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "700ea9fe92... |
8d80f686-e9ce-4d66-ac75-67ef8958a88c | TheRakibJoy/Algorithms | Number Theory/LOJ - 1024 with efficient BigInteger.cpp | #include<bits/stdc++.h>
#define Input freopen("in.txt","r",stdin)
#define Output freopen("out.txt","w",stdout)
#define ll long long int
#define ull unsigned long long int
#define pii pair<int,int>
#define pll ... | ALGO | 0.99998 | 3.773976 | {
"github_metadata": {
"branch": "master",
"commit_count": 880,
"repo_created_at": "2021-12-21T07:08:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6424e1a3... |
06a25885-f92d-4c70-8244-874750912e8d | Kecheng-Ye/My_Leetcode | Problem/By section/Search/BackTrack/Problem 698 */problem_698.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
bool canPartitionKSubsets(vector<int>& nums, int k) {
const int n = nums.size();
const int totalSum = accumulate(nums.begin(), nums.end(), 0);
if (totalSum % k) {
return false;
}
vector<int>... | ALGO | 0.999888 | 5.924695 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2021-09-03T01:57:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4e3b5ac8... |
9b01093a-079b-41c8-84b5-9ccd9bbb4806 | carmoran0/CodificacionPracticas | practica2/practica2.1/src/main.cpp | /*
* Práctica 2.1 - Simulación de un canal ruidoso
*
* Esta función simula un canal ruidoso para comunicaciones binarias.
* Recibe un vector binario de entrada, una longitud L en bytes, y una probabilidad de error f.
* Devuelve un vector de salida donde cada bit tiene una probabilidad f de haber cambiado su valor... | ALGO | 0.98422 | 5.802364 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2025-04-01T11:04:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "2d04897baf4... |
e84f3a41-c0c3-4a7b-9b81-95adf6d7190b | KSkun/OI-Templates | math/mul_inverse_exgcd.cpp | // Code by KSkun, 2018/3
#include <cstdio>
#include <algorithm>
typedef long long LL;
inline char fgc() {
static char buf[100000], *p1 = buf, *p2 = buf;
return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2) ? EOF : *p1++;
}
inline LL readint() {
register LL res = 0, neg = 1;
char c = fgc... | ALGO | 0.999949 | 4.252163 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2018-03-30T06:25:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "11c0ba03... |
374d16b4-f11b-4430-8701-b7303948ee9d | didiersmets/MU5MAM30 | Students/Rosi/src/P1.cpp | #include <stdio.h>
#include <string.h>
#ifdef USE_OPENMP
#include <omp.h>
#endif
#include "math_utils.h"
#include "P1.h"
#include "fem_matrix.h"
#include "adjacency.h"
#include "my_mesh.h"
#include "sparse_matrix.h"
#include "skyline.h"
void mvp_P1(const FEMatrix &A, const double *x, double *y)
{
size_t vtx_count ... | ALGO | 0.993407 | 4.034847 | {
"github_metadata": {
"branch": "main",
"commit_count": 113,
"repo_created_at": "2024-10-17T09:31:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fde4f17fde... |
330a7e91-ed83-428c-a5d9-0265d9d6c03c | i-m-atharva07/DSA_Pr | hashing.cpp | #include <iostream>
using namespace std;
int size;
int* array1;
int* array2;
void initializeArrays() {
array1 = new int[size];
array2 = new int[size];
for (int i = 0; i < size; i++) {
array1[i] = -1;
array2[i] = -1;
}
}
void display_LinearProbing()
{
cout << "Linear Probing Table... | ALGO | 0.99935 | 5.203781 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2025-05-06T12:46: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": "bb052a93a78... |
f9c03aeb-aa85-41cf-8951-436efb5fe425 | MRT4R1KUL1SL4M/CPP | MODULE-03/return_Function2.cpp | #include <bits/stdc++.h>
using namespace std;
class Student
{
public:
int roll;
int cls;
double gpa;
Student(int roll, int cls, double gpa)
{
this->roll = roll;
this->cls = cls;
this->gpa = gpa;
}
};
Student *fun() // এবার ফাংশনটি একটি পয়েন্টার রিটার্ন করবে, প... | TOOL | 0.94982 | 4.107508 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-03-18T20:44: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": "7892ff848199... |
6f114f51-f395-4c33-aadf-d73639089584 | fwillett/speechBCI | LanguageModelDecoder/srilm-1.7.3/lm/src/LoglinearMix.cc | /*
* LoglinearMix.cc --
* Log-linear mixture language model
*
*/
#ifndef lint
static char Copyright[] = "Copyright (c) 2005-2010 SRI International, 2013 <NAME>, Microsoft Corp. All Rights Reserved.";
static char RcsId[] = "@(#)$Header: /home/srilm/CVS/srilm/lm/src/LoglinearMix.cc,v 1.11 2019/09/09 23:13:13 stolck... | ALGO | 0.924101 | 5.875984 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2023-06-11T20:01:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 167,
"forks": 40,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "0811a9ee... |
555a3648-c17a-4d36-887a-128b4d8036c3 | intel/intel-extension-for-transformers | intel_extension_for_transformers/transformers/runtime/kernels/src/cpu/jit_domain/jit_trans_AB16a4b.cpp | // Copyright (c) 2022 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... | ALGO | 0.998909 | 6.171096 | {
"github_metadata": {
"branch": "main",
"commit_count": 2126,
"repo_created_at": "2022-11-11T05:32:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2169,
"forks": 215,
"issues": 31,
"pull_requests": 25
},
"file_meta": {
"content_id": "e69... |
48445995-63b1-48eb-ac69-ebe9c0874467 | AlbertoZarzaM/Cifrado-de-clave-publica-RSA | funciones.h |
#include <iostream>
#include <cstdlib>
#include <string>
#include <cmath>
#include <algorithm>
#include <cctype>
#include <sstream>
#include <vector>
std::vector<long long int> splitString(std::string input) {
std::vector<long long int> values;
std::stringstream ss(input);
long long int temp;
while (s... | ALGO | 0.999881 | 4.361589 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-04-06T14:06:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4989b4368681... |
ebc96f5c-3e0a-4904-b0be-a046c753c136 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/04/0420/personal_submission/cf1615d_sheepstick.cpp | #include<bits/stdc++.h>
using namespace std;
using i64 = long long;
void solve() {
int n, m; cin >> n >> m;
vector<vector<array<int,2>>> adj(n);
for (int i = 0; i < n - 1; i++){
int u, v, w; cin >> u >> v >> w;
u--; v--;
adj[u].push_back({v, w});
adj[v].push_back({u, w});
}
vect... | ALGO | 0.999857 | 5.415696 | {
"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": "c624... |
c1638820-a859-474a-b12a-575bb270b9d6 | GordilloXavi/pro1 | consolidation/P35246.cc | #include <iostream>
#include <vector>
using namespace std;
struct Person{
string name;
int age;
} ;
void swap(Person& a, Person& b){
Person t = a;
a = b;
b = t;
}
void sort(vector<Person>& v){
int s = v.size();
bool sorted = false;
for(int i = 0; i<s-1 and not sorted; ++i){
... | ALGO | 0.999447 | 4.847919 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2018-10-11T16:40: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": "18c0e5a61... |
5508acfe-3da1-477a-8cf9-73c728cada60 | A-lioth/Cpp_Program | LeetCode/贪心/T763_Partition-Labels.cpp | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
vector<int> partitionLabels(string s)
{
vector<int> res;
if (s.empty())
{
return res;
}
vector<int> last(26);
// 记录每个字符最后出现的位置
for (int i = 0; i < s.size(); i++)
{
last[s[... | ALGO | 0.999929 | 4.804823 | {
"github_metadata": {
"branch": "main",
"commit_count": 150,
"repo_created_at": "2024-03-11T11:31:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e88c3f3e5e... |
e90b4322-5e79-472c-8b55-8c3ee07065ad | RTcmix/RTcmix | insts/jg/objlib/Butter.cpp | /* Butterworth filter class, by <NAME>.
Just a knock-off of clm and csound ones, which come right outta Dodge.
*/
#include "Butter.h"
#include <assert.h>
#define SQRT2 1.4142135623730950488
enum {
LOW_PASS,
HIGH_PASS,
BAND_PASS,
BAND_REJECT
};
Butter :: Butter(double srate) : JGFilter(srate)
{
in... | ALGO | 0.99275 | 4.847745 | {
"github_metadata": {
"branch": "master",
"commit_count": 5201,
"repo_created_at": "2014-06-27T01:07:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 51,
"forks": 13,
"issues": 2,
"pull_requests": 1
},
"file_meta": {
"content_id": "547327... |
32004b5c-8eef-47ea-a60a-73c62dbcfa91 | yealuo/Leetcode | HUAWEI_Question/HJ57.cpp | //
// Created by Administrator on 2024/4/12.
//
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
string str1, str2;
cin >> str1 >> str2;
std::reverse(str1.begin(), str1.end());
std::reverse(str2.begin(), str2.end());
int carry = 0, size = min(str1.size... | ALGO | 0.999991 | 5.907276 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-03-21T10:06:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21ac8819a40... |
eac1742d-7e8f-4b5a-a4f2-f7f0a9dec7f0 | dishant4163/A2Z-DSA-Striver | Step-8 Bit Manipulation (Basic to Advanced Maths)/Lec-3 Advanced Bit Manipulation/3_AllDivisorsOfaNumber.c++ | //Print all Divisors of a given Number
/* // Sum of all divisors
(Coding Ninjas -> https://www.naukri.com/code360/problems/sum-of-all-divisors_8360720?utm_source=striver&utm_medium=website&utm_campaign=a_zcoursetuf )
int sumOfAllDivisors(int n){
// Write your code here.
int sum = 0;
for(int i=1; i <= n; i++) ... | ALGO | 0.998472 | 5.607902 | {
"github_metadata": {
"branch": "main",
"commit_count": 732,
"repo_created_at": "2024-07-30T12:22:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6610fb9c19... |
84b6d037-0eff-431c-adec-4891400f564a | andrewjkanarek/BlackjackGit | blackjack/stats.cpp | #include "deck.h"
#include "stats.h"
#include <iostream>
// #include <unordered_map>
using namespace std;
// namespace BJ {
Stats::Stats()
{
decision = "HIT";
resetStats();
}
void Stats::resetStats()
{
dealer_bust = 0;
win_ah = 0;
lose_ah = 0;
push_ah = 0;
win = 0;
lose = 0;
push = 0;
player_prob_map =
{... | ALGO | 0.995799 | 3.864355 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2018-08-31T22:36: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": "9140b3494... |
eaf7bfc4-7a82-46f6-924f-a9d8915142bb | ahao214/Algorithm | Ahao.LeetCodeCPP/228. 汇总区间.cpp | #include<vector>
#include <string>
using namespace std;
/*
228. 汇总区间
给定一个 无重复元素 的 有序 整数数组 nums 。
返回 恰好覆盖数组中所有数字 的 最小有序 区间范围列表 。
也就是说,nums 的每个元素都恰好被某个区间范围所覆盖,
并且不存在属于某个范围但不属于 nums 的数字 x 。
列表中的每个区间范围 [a,b] 应该按如下格式输出:
"a->b" ,如果 a != b
"a" ,如果 a == b
*/
class Solution {
public:
vector<string> summaryRanges(vector... | ALGO | 0.999916 | 5.953119 | {
"github_metadata": {
"branch": "master",
"commit_count": 4359,
"repo_created_at": "2020-09-14T10:24: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": "9a497eb... |
4102d18a-74e4-45d6-8c54-fb46d777ec69 | zhengyiq/Linux_Learning | Linux_30线程的同步与互斥/mythread.cc | #include <iostream>
#include <cstdio>
#include <pthread.h>
#include <string>
#include <unistd.h>
#include <cstring>
using namespace std;
int tickets = 1000; // 临界资源, 加锁保证临界
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; // 使用这种方式不用进行destory,若是在局部那么就需要使用pthread_mutex_init来进行初始化
void* threadRoutine(void* name)
{
... | ALGO | 0.973791 | 4.13003 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2022-11-10T07:12: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": "2107bbf3528... |
32d4c10c-6b42-4f91-877c-19679ebff9e2 | CantaTronic/AccelCpp | chapt6/6_06_GradeSystms/median.cc |
//source file forthe median.h
#include "hw_cont.h"
#include "Student_info.h"
#include <algorithm>
#include "grade.h"
double median (doubleCont cont) {
/*Calculate the median in provided container, using iterators*/
double med;
auto itr = cont.begin();
if( cont.size() % 2 == 0 ) { // n is even
... | ALGO | 0.999847 | 5.028975 | {
"github_metadata": {
"branch": "master",
"commit_count": 129,
"repo_created_at": "2017-11-07T23:20: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": "67dbaa1a... |
28fc1168-552a-473e-98e4-717f394c0e0b | gagandeepahuja09/Arrays | InterviewBit/RepeatAndMissingNumberArray.cpp | vector<int> Solution::repeatedNumber(const vector<int> &A) {
int xxor = A[0];
int n = A.size();
for(int i = 1; i < n; i++) {
xxor ^= A[i];
}
for(int i = 1; i <= n; i++) {
xxor ^= i;
}
vector<int> ret(2, 0);
int x = 0, y = 0;
int sb = xxor & (~(xxor - 1));
for(int ... | ALGO | 0.999915 | 4.911293 | {
"github_metadata": {
"branch": "master",
"commit_count": 99,
"repo_created_at": "2019-03-01T06:44:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb485ea1c... |
15f34212-04c1-4b8f-bbf9-44ffc6519119 | csci0300/cs300-s21-projects | distributed-store/common/common.cc | #include "common.h"
#include <algorithm>
#include <cassert>
#include <regex>
#include <cstring>
void sortAscendingInterval(std::vector<shard_t>& shards) {
std::sort(
shards.begin(), shards.end(),
[](const shard_t& a, const shard_t& b) { return a.lower < b.lower; });
}
size_t size(const shard_t& s) { ret... | ALGO | 0.986344 | 5.507051 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2021-01-20T04:02:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 6,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa705a4303... |
c8dbc9bd-a903-4ab7-b8a2-6c899ca96124 | MuhammadIrfan23/SWC1323-Project | SWC PROJECT 2.cpp | /*
Program purpose: to collect user input for student ID, student name,
scores, and attendance
Programmer:<NAME>
DATE:19 NOVEMBER 2023
*/
#include <iostream>
#include <math.h>
#include <iomanip> // For setw
#include <string>
using namespace std;
// Function prototypes
void inputStudentData(int numStudents, int ... | TOOL | 0.929157 | 4.961756 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-11-20T16:49: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": "09f926091bcb... |
68fffb14-1e6c-499f-ad8a-2b8e5f09919d | AadeshPochhi/Leetcode-Problems | 0148-sort-list/0148-sort-list.cpp | /**
* Definition for singly-linked list.
* 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) {}
* };
*/
class Solution {
public:
ListNode* mergeTwoLis... | ALGO | 0.999993 | 5.972178 | {
"github_metadata": {
"branch": "main",
"commit_count": 643,
"repo_created_at": "2024-01-13T18:33:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9742c576f9... |
9e5a6d02-7611-4592-b354-c7bbdc02b2fd | mckel5/csc211 | mc/mc5/main_1.cpp | /*
Temperature converter. This program should prompt the user for two arguments, first a decimal number and second, a single letter, either C or F. The decimal represents a temperature, the character represents which system that degree is in (50.0 F would be 50.0 degrees Fahrenheit etc.). This program should take the g... | TOOL | 0.95642 | 6.334804 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-05-02T18:11: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": "ae7ffff6475d... |
a5c4cc4e-0f83-4851-a329-a0e08ce8021e | rajesh-1920/Competitive_Programming_Problem_Solving | Codeforces/B_Chess_Cheater.cpp | // Author: <NAME>
// CF : rajesh-1920
// Date : 23.04.2025
#include <bits/stdc++.h>
using namespace std;
//----------------------------(definition section)-----------------------------------------
#define dbg(x) cout << #x << " = " << x << '\n'
#define int long long int
#define fi first
#define sc second
#defi... | ALGO | 0.999941 | 4.143558 | {
"github_metadata": {
"branch": "main",
"commit_count": 263,
"repo_created_at": "2024-10-21T13:58: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": "2037f85d78... |
86ef2f5d-7998-4626-8cfe-1a338135ced9 | Jidapakantawong/ENGCE117 | Homework/Lab2/lab2_3.cpp | #include <stdio.h>
#include <string.h>
void explode( char str1[], char splitter, char str2[][10], int *count ) ;
int main() {
char out[ 20 ][ 10 ] ;
int num ;
explode( "I/Love/You", '/', out, &num ) ;
for( int i = 0 ; i < num ; i++ ) {
printf( "str1[%d] = %s\n", i , out[ i ] ) ;
}//... | TOOL | 0.975353 | 3.212721 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2024-11-26T17:30: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": "81f06447a11... |
76c2af7c-3343-4eeb-9dff-3ec60a0d8e88 | burhankapadia18/CPP-DSA | Algorithms/Dynamic Programming/problems/tillingProblemII.cpp | #include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
// template<typename T>
#define ll long long int
#define ld long double
#define mod 1000000007
#define inf 1e18
#define ESPILON 1e-9... | ALGO | 0.999963 | 4.990463 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2021-02-14T06:44:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7c72497d4a6... |
0d112e84-49f9-42c8-9995-c1f9cfc10551 | ishevche/Heat-solver | src/main_process.cpp | // This is a personal academic project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com
#include "main_process.h"
#include "timer.h"
#include <mpi.h>
#include <png++/png.hpp>
void main_process(const configs &config,
int world_size,
... | DATA | 0.964823 | 4.903156 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-06-14T08:31: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": "2305625d2afa... |
59bb23b7-9aa3-4336-ae6c-cadf0a6403e0 | rohitjuyal21/DSA | 11_Binary_Search/Binary_Search_Questions/aggressiveCows.cpp | #include <iostream>
#include <algorithm>
using namespace std;
bool isPossible (int arr[], int size, int c, int mid) {
int cowCount = 1;
int lastPos = arr[0];
for(int i = 1; i < size; i++) {
if(arr[i] - lastPos >= mid) {
cowCount++;
lastPos = arr[i];
}
i... | ALGO | 0.999994 | 4.555408 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-01-18T13:04:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d9bea3e2fb3c... |
6e27e693-d11e-4112-a471-95a33c49781d | miskin1991/SoftUni-Cpp-May-2023-Advanced | memory_management/5_compare_matrices/main.cpp | #include <iostream>
#include <sstream>
using namespace std;
int** ReadMatrix(istream& buffer, size_t& rows, size_t& cols) {
buffer >> rows; buffer.ignore();
int** matrix = new int*[rows];
for (int i = 0; i < rows; i++) {
string input;
getline(buffer, input);
stringstream sstr(inp... | ALGO | 0.999414 | 4.996498 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2023-05-03T11:40: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": "714812121e9... |
76454a60-44cd-4ad1-864b-04bd2c734be9 | PIUphil/ROS2 | STL/hello.cpp | #include <iostream>
#include <string>
// #include <string.h>
// #include <cstring>
using std::cin;
using std::cout;
using std::endl;
using std::string;
int main()
{
// const string str = "hello, world";
string name;
cout << "input your name : ";
cin >> name;
//const string greeting = "hello, world " + name;
c... | ALGO | 0.986505 | 3.185293 | {
"github_metadata": {
"branch": "main",
"commit_count": 137,
"repo_created_at": "2021-06-28T07:35:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a2ded38b6c... |
f194d587-896f-4ad4-8b17-509d8d8646fa | abobco/Robot-Rover | windows/src/robo/xn_search.cpp | #include "xn_search.hpp"
namespace xn {
bool GridNodeCompare::operator()(const GridNode &lhs,
const GridNode &rhs) const {
if (reverse)
return (lhs.cost > rhs.cost);
else
return (lhs.cost < rhs.cost);
}
std::size_t GridHash::operator()(const GridNode &node) const {
std:... | ALGO | 0.99953 | 5.678449 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2021-07-09T04:36:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b9623aca462... |
95aef64c-c648-4287-af6d-83c7711114dc | ishandutta2007/codeforces-d | dmga44/normal/1468/E.cpp | #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops","omit-frame-pointer","inline")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,avx2,fma,tune=native")
#pragma GCC option("arch=native","no-zero-upper") //Enable AVX
#include <bits/stdc++.h>
#define db(x) cout << (x) << '\n';
#de... | ALGO | 0.999503 | 4.519972 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "95f268fd4312... |
eb277e6f-f8a4-4599-b568-f5a57eb670ef | Md-Pranta/graph | CycleofEdges.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define N 100005
#define SetBit(x, k) (x |= (1LL << k))
#define ClearBit(x, k) (x &= ~(1LL << k))
#define CheckBit(x, k) ((x>>k)&1)
#define M 10000000007
#define all(x) x.begin(), x.end()
#define kill(x) return cout << x << endl, void();
typedef pair<in... | ALGO | 0.999907 | 3.989713 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-08-19T15:58: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": "dfbabd135b41... |
6e46c9ef-5917-475b-a469-55c07f239837 | zoomkoding/Baekjoon | ICPC/2019년/ProblemH/solution.cpp | #include <cstdio>
#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
using namespace std;
vector<int> v[4];
int main(){
int n;
scanf("%d", &n);
for(int i = 0; i * i <= 50000; i++) {
v[0].... | ALGO | 0.999956 | 3.255648 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2019-06-25T14:40:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c5ca5053... |
ae90ebd6-da5b-4ca8-89a7-d8fa07c9f689 | SH02-tech/Algoritmica | Practica_3/src/ejercicio-2-c.cpp | #include <iostream>
#include <fstream>
#include "grafo.h"
#include <iomanip>
#include <chrono>
#include <math.h>
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Heurística basada en la idea del algoritmo de Kruskal
///////////////////////////////////////////////... | ALGO | 0.999918 | 4.796735 | {
"github_metadata": {
"branch": "main",
"commit_count": 363,
"repo_created_at": "2022-03-18T09:23:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "28c997f790... |
8e3fdfaf-dd99-4b9f-8b37-b3149800742f | mfem/mfem | fem/moonolith/pmortarassembler.cpp | // Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
// This file is part of the MFEM library. For more information and source code
// availability visit ht... | ALGO | 0.968151 | 6.353714 | {
"github_metadata": {
"branch": "master",
"commit_count": 24273,
"repo_created_at": "2015-06-11T21:42:21.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1934,
"forks": 544,
"issues": 96,
"pull_requests": 189
},
"file_meta": {
"content_id": ... |
d4df05c3-a6b8-42c8-8681-8da930a41f93 | Sanchell1o/Algosi | lab1/solution/testing.cpp | #include <cassert>
#include <iostream>
#include <cmath>
#include <iomanip>
#include "../rbtree.cpp"
void printTestHeader(const std::string &testName) {
std::cout << "\n========================================\n";
std::cout << "=== " << testName << " ===" << std::endl;
std::cout << "=======================... | TEST | 0.972065 | 7.080146 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2025-07-08T20:05: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": "e0be5b7b8a9c... |
43d30795-054e-4a39-8436-41fc007f05d9 | gpufs/gpufs | samples/mosaic/utils.cpp | #include "tbb/tbb.h"
#include "tbb/task_scheduler_init.h"
#include "loader.h"
#include "utils.h"
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
//#include "histLib.h"
#include <sys/mman.h>
#include <thread>
#include <vector>
#include <unordered_set>
#include <unordered_map>
#include <immintrin.h>
... | ALGO | 0.996101 | 3.249259 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2013-03-15T14:43:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 94,
"forks": 41,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "c897d9d... |
7eaa7157-2b03-413e-98a6-9846ea0848f2 | ishandutta2007/codeforces-e | endagorion/normal/1032/G.cpp | #include <bits/stdc++.h>
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define... | ALGO | 0.999539 | 3.582576 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:34: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": "fb944b33d7c9... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.