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 |
|---|---|---|---|---|---|---|---|
c0e7438b-ad5e-48bb-881c-089624256584 | Lunka/lab5-tree | main (1).cpp | #include <iostream>
// Визначення структури вузла дерева
struct TreeNode {
int val;
TreeNode* left;
TreeNode* right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
// Допоміжна функція для перевірки симетрії
bool isMirror(TreeNode* left, TreeNode* right) {
// Якщо обидва вузли порожн... | ALGO | 0.999945 | 6.53232 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-13T15:48: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": "fc7421b7ee3c... |
67decedf-a714-47be-b06d-0b6089f696a4 | aquaragon/Number_Generator_Finder_Arrays | Functions.cpp | #include "Header.h"
int getSize() //returns size of array
{
int value;
cout << "Enter value between 10 and 20:" << endl;
do
{
cin >> value;
if (cin.fail() || value < 10 || value > 20)
{
cout << "Invalid entry, please try again\n";
cin.clear();
cin.ignore(LARGE, END_LINE);
}
} while (value < 1... | ALGO | 0.996944 | 3.917682 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-05-12T18: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": "103d9f4ae6... |
662d0d0b-e413-473e-9a56-8bcfa4137b64 | apoorv-gupta/topcoder | P/PotentialGeometricSequence.cpp | #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cst... | ALGO | 0.998941 | 4.530308 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2013-09-16T01:09:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "515b5c924... |
76f2cde5-92c7-4bfb-855d-082236fad435 | Prabhath003/Opearting-Systems | ProgAssgn4-CS20BTECH11038/SrcAssgn4-tas-CS20BTECH11038.cpp | // including the libraries
#include <iostream>
#include <fstream>
#include <thread>
#include <ctime>
#include <chrono>
#include <atomic>
#include <cstring>
#include <random>
// declaring the global variables
int n, k;
double lamda1, lamda2;
// declaring the atomic lock
std::atomic_flag lock = ATOMIC_FLAG_INIT;
// de... | ALGO | 0.988258 | 4.547969 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2022-06-26T14:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7385945766f... |
cbeb01cb-5655-40ec-ad40-1588a1a6ed7a | NotTfueee/Road-To-GrandMaster | AtCoder/Contests/ABC351/SpotTheDifference.cpp | // Created by <NAME> on 04/03/24.
#include <bits/stdc++.h>
using namespace std;
#define ZOOM ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl '\n'
/*----------------------------------------------------------------------------------------*/
void solve()
{
int n ; cin >> n ;
vector< vector<cha... | ALGO | 0.999721 | 4.105944 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2024-04-12T17:43: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": "899b009645e... |
6d6d6529-9017-4eb6-834b-04be84d49011 | GipsyOmega/Data-Structures-II | Queues_using_array.cpp | #include <iostream>
#define stacksize = 100
using namespace std;
int queue[100], n = 100, front = -1, rear = -1;
void enqueue(int val)
{
if (rear == n - 1)
{
cout << "Queue Stackflow\n";
}
else
{
if (front == -1)
{
front++;
}
rear++;
queue... | ALGO | 0.981924 | 3.819884 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-14T09:57: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": "ed9493c61923... |
4397428e-324a-48d7-9df2-4948a185587b | ardekb01/babak_lib | src/TPS.cxx | #define _TPS
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
#include <volume.h>
#include <ctype.h>
#include <nifti1_io.h>
#include <niftiimage.h>
#include <babak_lib.h>
#include <minmax.h>
#include <interpolator.h>
#define YE... | TOOL | 0.964755 | 3.795773 | {
"github_metadata": {
"branch": "master",
"commit_count": 348,
"repo_created_at": "2016-03-07T16:07:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb287564... |
e26a7f1c-c03b-4837-bb3c-1fdaec3e2455 | Jeroenodb/competitiveProgramming | Rangequeries/segmenttree.cpp | #include "bits/stdc++.h"
using namespace std;
#define all(x) begin(x),end(x)
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::va... | ALGO | 0.999931 | 4.915322 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-01-28T23:24:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "adeb0c3761b1... |
2a6132a9-101c-4ba3-abd6-65ac02ad98d9 | cxyfer/OJ | Leetcode/cpp/hard/600.cpp | /*
* @lc app=leetcode.cn id=600 lang=cpp
*
* [600] 不含连续1的非负整数
*/
// @lcpr-template-start
#include <bits/stdc++.h>
using namespace std;
// @lcpr-template-end
// @lc code=start
class Solution {
public:
int findIntegers(int n) {
int m = __lg(n);
int memo[m + 1][2][2];
memset(memo, -1, siz... | ALGO | 0.999991 | 5.736499 | {
"github_metadata": {
"branch": "main",
"commit_count": 439,
"repo_created_at": "2025-01-18T20:29: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": "d4c733b727... |
12570877-d44a-4357-9a62-9b271b1d2495 | mattxgong/Programming-Solutions | ECOO/ECOO '17 R3 P1 - Baker Brie.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
for(int k = 0; k < 10; k++){
int F, D, sums[130] = {0}, counter = 0;
cin >> F >> D;
for(int i = 0; i < D; i++){
int temp = 0;
for(int j = 0; j < F... | ALGO | 0.9972 | 3.24412 | {
"github_metadata": {
"branch": "master",
"commit_count": 126,
"repo_created_at": "2020-08-27T17:08: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": "51df9a5c... |
a238dbdc-486b-4fe2-aa81-3494313fdd46 | alexandraback/datacollection | solutions_5688567749672960_0/C++/sandyeep/a.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pr16
#ifdef pr16
#define pr(x) cerr << #x << ": " << x << endl;
#define pr2(x, y) cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define pr3(x, y, z) cerr << #x << ": " << x << " | " <<... | ALGO | 0.999024 | 3.703432 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e9af0ea88... |
d279a00a-e589-4d60-82d0-1dfa42ceac96 | AkshatAggarwal14/Competitive-Programming | CodeChef/ATAT.cpp | #ifdef LOCAL
#include "Akshat.hpp"
#else
#include "bits/stdc++.h"
using namespace std;
#define dbg(...)
#endif
using ll = long long;
auto sz = [](const auto &container) { return int(container.size()); };
#define all(x) begin(x), end(x)
const ll INF = 1e18;
const ll N = 1e5 + 5;
const ll MOD = 1e9 + 7; // 998244353
v... | ALGO | 0.999903 | 3.805225 | {
"github_metadata": {
"branch": "master",
"commit_count": 850,
"repo_created_at": "2021-08-16T13:49:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2f85c86... |
437aa07d-30f5-45e4-bc46-a2ff38d08a00 | zhuethanca/DiffusionCurves | src/diffusion/fd_partial_derivative.cpp | #include "diffusion/fd_partial_derivative.h"
void fd_partial_derivative(const int nx, const int ny,
const int dir, Eigen::SparseMatrix<double> &D) {
int sx = (dir == 0 ? nx - 1 : nx);
int sy = (dir == 1 ? ny - 1 : ny);
int m = nx * ny;
std::vector<Tripletd> tripletList;
t... | ALGO | 0.997437 | 5.950187 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2020-11-24T22:34:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bcdba256... |
ef96ab33-822d-4434-b3f5-24f2a8b63379 | fpietru/Competitive_Programming | preoi23/dzien4/slalom/a.cpp | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
#define FR first
#define SD second
#define PB push_back
constexpr int MxN = 2e3+3;
constexpr ll INF = 1e18+7;
ll cost[MxN][MxN][2];
vector<int> G[MxN];
vector<int> topo;
int tid[MxN];
bool sasiad[MxN][MxN];
bool colored[Mx... | ALGO | 0.999974 | 4.031599 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-01-12T23:50:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e18f750bb30e... |
cab0ae9f-f456-428b-9e50-0aee95bc4095 | BemreSTR/CSE241-OOP | Homeworks/PA4/main.cpp | #include "World.h"
#include "Robot.h"
#include <iostream>
#include <cstdlib> // for rand()
#include <ctime> // for time()
#include <string>
using namespace std;
int main() {
cout << "=======================================" << endl;
cout << " ROBOT BATTLE SIMULATION " << endl;
cout << "===... | TOOL | 0.950566 | 3.896148 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2025-06-18T09:31: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": "19e690b3752e... |
2b299d20-dbf1-438c-a6f8-d2b65afc791f | zukun/rcc | vxl/vxl-1.13.0/contrib/brl/bseg/sdet/sdet_vehicle_finder.h | #ifndef sdet_vehicle_finder_h_
#define sdet_vehicle_finder_h_
//---------------------------------------------------------------------
//:
// \file
// \brief a processor for finding vehicles
//
// \author
// <NAME> - July 11, 2004
//
// \verbatim
// Modifications
// none
// \endverbatim
//
//--------------------------... | ALGO | 0.993236 | 3.971821 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2013-02-21T15:10:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 16,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "22d1aa8... |
d79a0471-1228-48a9-96e3-5065784eb7e2 | adrianojp1/utfpr-computer-graphics | list2/question6.cpp | #include <iostream>
#include <stdlib.h>
#include <GL/glew.h>
#include <GL/freeglut.h>
#include "../lib/utils.h"
#include "../lib/euclidian.h"
using namespace std;
/* Globals */
/** Window width. */
int win_width = 800;
/** Window height. */
int win_height = 600;
/** Program variable. */
int program;
/** Vertex array... | TOOL | 0.982236 | 4.960911 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2023-03-04T20:08:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2cdbf5d6d3... |
41e70ca6-fdf6-47ca-85cc-8aa1f835f39e | bauhaus93/gann | GANN/Genetic.cpp | #include "Genetic.h"
using namespace std;
#define AND { 0, 0, 0,\
0, 1, 0,\
1, 0, 0,\
1, 1, 1}
#define OR { 0, 0, 0,\
0, 1, 1,\
1, 0, 1,\
1, 1, 1}
#define NOR { 0, 0, 1,\
0, 1, 0,\
1, 0, 0,\
1, 1, 0}
#define NAND { 0, 0, 1,\
0, 1, 1,\
1, 0, 1,\
1, 1, 0}
#define IMPL... | ALGO | 0.999873 | 4.987859 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2016-10-15T23:00: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": "69b00bd72... |
b9219285-9823-4064-99ba-0f64c591e98a | joaopedroxavier/Competitive-Programming | codeforces/educ29/b.cpp | #include <bits/stdc++.h>
using namespace std;
#define topper top //XDDDDDDD
#define mp make_pair
#define pb push_back
#define db(x) cerr << #x << " == " << x << endl;
#define _ << " " <<
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
const long double EPS = 1e-9;
const int N=1e2+5;
const ... | ALGO | 0.999981 | 3.516881 | {
"github_metadata": {
"branch": "master",
"commit_count": 206,
"repo_created_at": "2017-02-18T15:38: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": "c25417c0... |
0073ce26-c553-4a7f-bb86-d68dc4c7dc79 | EMiheeva/University_projects | semester_3_labs_Algorithms_and_data_structures/lab_11__Quick sort_/main.cpp | #include <iostream>
#include <chrono>
using namespace std;
const int N = 10;
int mediana (int a, int b, int c)
{
if (a > b) {
if (c > a)
return a;
return (b > c) ? b : c;
}
if (c > b)
return b;
return (a > c) ? a : c;
}
void QuickSort(int mas[], int left, int right) {
if (left == ... | ALGO | 0.999633 | 4.810879 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2024-04-29T09:57:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3d5dd61b4b0... |
72548af2-43e2-4372-a40d-838e6a4ae469 | RBSuhail/Leetcode | 0011-container-with-most-water/0011-container-with-most-water.cpp | class Solution {
public:
int maxArea(vector<int>& height) {
int n = height.size();
int A2, w, h;
int i = 0, j = n - 1;
int A1 = 0;
while (j > i) {
h = min(height[i], height[j]);
w = j - i;
A1 = max(A1, h * w);
// After that, ... | ALGO | 0.999981 | 6.903815 | {
"github_metadata": {
"branch": "main",
"commit_count": 250,
"repo_created_at": "2024-08-03T04:40: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": "d24d7223b0... |
14ab9dd2-197b-48c8-9246-17ab0ee28970 | vivCoding/practice | leetcode/1289_minFallingPathSum2.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pld;
typedef vector<ll> vll;
const ll MOD9 = 1e9 + 7;
/*
* Problem: https://leetcode.com/problems/minimum-falling-path-sum-ii/
*/
class Solution {
public:
int minFallingPathS... | ALGO | 0.999975 | 5.473293 | {
"github_metadata": {
"branch": "main",
"commit_count": 84,
"repo_created_at": "2021-10-28T17:28: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": "892099ad2e9... |
40e258c2-31d5-4adb-b852-87cad3785c9a | bo1929/krepp | src/krepp.hpp | #ifndef _KREPP_H
#define _KREPP_H
#include "common.hpp"
#include "index.hpp"
#include "sketch.hpp"
#include "lshf.hpp"
#include "phytree.hpp"
#include "query.hpp"
#include "seek.hpp"
#include "record.hpp"
#include "rqseq.hpp"
#include "table.hpp"
#include <CLI.hpp>
const auto url_validator = CLI::Validator(
[](std:... | TOOL | 0.908528 | 6.735888 | {
"github_metadata": {
"branch": "master",
"commit_count": 117,
"repo_created_at": "2024-05-20T16:31:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "68f0386... |
3f6aab3f-dbaa-4dde-be8c-db1c4f050763 | VictorE076/Graph_Problems_Leetcode | Trilant_Infoarena.cpp | #include <iostream>
#include <fstream>
#include <queue>
#include <vector>
#include <algorithm>
#include <climits>
#include <limits>
using namespace std;
//ifstream f("trilant.in.txt");
//ofstream g("trilant.out.txt");
ifstream f("trilant.in");
ofstream g("trilant.out");
const long long MAX_LIMIT = LLONG_MAX;
vector<lo... | ALGO | 0.999949 | 4.421708 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-10-25T16:12: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": "30831291d6f6... |
e7c3fcbc-480e-4fb6-8931-8a9770b6a216 | Huloiarnata/OODP_Practical_SRM25 | week7/ques5.cpp | /*
Make a class named Fruit with a data member to calculate the number of fruits in a basket.
Create two other classes named Apples and Mangoes to calculate the number of apples and
mangoes in the basket. Print the number of fruits of each type and the total number of fruits
in the basket.
*/
#include <iostream>
using ... | TOOL | 0.994006 | 5.431611 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-10-31T04:44: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": "dcede3389aa3... |
d0c06a0c-bd9d-4d9b-88dd-1574889e2e39 | sinya8282/Regen | src/app/recon.cc | #include "../util.h"
#include "../lexer.h"
#include "../regen.h"
#include "../regex.h"
#include "../expr.h"
#include "../exprutil.h"
#include "../nfa.h"
#include "../dfa.h"
#include "../sfa.h"
#include "../generator.h"
enum Generate { DOTGEN, REGEN, CGEN, TEXTGEN, KEYWORD };
void Dispatch(Generate generate, const reg... | ALGO | 0.969362 | 6.454278 | {
"github_metadata": {
"branch": "master",
"commit_count": 259,
"repo_created_at": "2011-05-18T06:36:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 85,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bcca24e... |
9bac486c-ec87-4825-888a-cb65cc716ee1 | samuka7abr/Competitive-Programming | CodeForces/CR1025(DIV2)/B.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int teto_log2(int x) {
if (x <= 1) return 0;
int log2Inf = 31 - __builtin_clz(x);
if (x == (1 << log2Inf)) {
return log2Inf;
} else {
return log2Inf + 1;
}
}
int main() {
ios::sync_with_stdio(false);
cin.... | ALGO | 0.999891 | 4.151525 | {
"github_metadata": {
"branch": "main",
"commit_count": 112,
"repo_created_at": "2025-01-25T21:52: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": "60da385a7a... |
7ac893e1-91e3-4897-b854-5eb3bb1b197b | anibalvale666/is1-2017-lab | 111/main.cpp | #include <iostream>
#include "CNTree.h"
using namespace std;
int main()
{
int **a_lo_bruto;
a_lo_bruto = new int *[8];
for(int i=0;i<8;i++)
a_lo_bruto[i] = new int[8];
for(int i=0;i<8;i++)
for(int j=0;j<8;j++)
{
a_lo_bruto[i][j] =0;
}
a_lo_bruto[0][1] =... | ALGO | 0.999681 | 3.042173 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-08-26T18:29: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": "30fda0e76a... |
8bdf30d9-c2bb-4e82-bfba-fee65575657d | Mangelitoto/EXAMEN-FINAL-Cpp | ExamenC++_MiguelN/ejerciciofinal19.cpp | #include <iostream>
#include <string>
using namespace std;
string encriptarPalabra(const string& palabra, int clave) {
string palabraEncriptada = "";
for (char letra : palabra) {
palabraEncriptada += char(int(letra) + clave);
}
return palabraEncriptada;
}
int main() {
string palabra;
... | ALGO | 0.998606 | 4.439634 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-12-16T13:42: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": "4b2e87f544fd... |
e1ca2374-1478-4eca-a9f1-bdc979b8c168 | raincross7/code-similarity | codes/train_code/problem207/problem207_184.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define M (ll)1000000007
#define MM (ll)1e8
#define INF (ll)1e18
#define arep(i, x, n) for (long long i = x; i < n; i++)
#define rep(i, n) for (long long i = 0; i < n; ++i)
#define pi 3.141592653589793
#define eps 0.00000001
int main() {
char s[52... | ALGO | 0.999967 | 4.059831 | {
"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": "efb9d91a99af... |
2b1a42fc-7a46-4b85-bc07-9d8823e33290 | kamyu104/LeetCode-Solutions | C++/maximum-number-of-groups-with-increasing-length.cpp | // Time: O(n)
// Space: O(n)
// constructive algorithms, counting sort, greedy
class Solution {
public:
int maxIncreasingGroups(vector<int>& usageLimits) {
const auto& inplace_counting_sort = [](vector<int> *nums, bool is_reverse) {
if (empty(*nums)) {
return;
}
... | ALGO | 0.999974 | 6.193223 | {
"github_metadata": {
"branch": "master",
"commit_count": 19395,
"repo_created_at": "2018-10-11T17:38:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4939,
"forks": 1616,
"issues": 1,
"pull_requests": 55
},
"file_meta": {
"content_id": ... |
aa4e77f8-02ef-4fc8-b354-71c9ef50b099 | VA-run23/GeeksforGeeks-POTD | July/POTD_01_07_2025.cpp | /*
1. Initialize a sliding window with pointers 'left' and 'right', and use an unordered map to count character frequencies.
2. Expand the window by incrementing 'right' and update the character frequency map.
3. While the current window size is at least 'k', check if the number of distinct characters is 'k... | ALGO | 0.999985 | 6.544959 | {
"github_metadata": {
"branch": "main",
"commit_count": 266,
"repo_created_at": "2025-01-05T07:57: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": "90a9f600e0... |
1beb6e38-fe4c-4904-b548-54020c2e0b96 | AlaaAbuHantash/Competitive-Programming | TopCoder SRM/SRM 647 Div 2 - 250.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <stack>
#include <cstring>
#include <math.h>
#include<cstdio>
#include<deque>
#include<sstream>
/*YOU got a DREAM, YOU gotta protect it. */
using namespace std;
i... | ALGO | 0.999884 | 3.797795 | {
"github_metadata": {
"branch": "master",
"commit_count": 112,
"repo_created_at": "2018-04-10T11:13:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "044b6d7c... |
dfe58ce9-bb4f-41cb-b36f-90ed0ccc9e96 | imxinlei/leetcode | 229_Majority_Element_II.cpp | /*
* https://leetcode.com/problems/majority-element-ii/description/
*
* Given an integer array of size n, find all elements that appear more than
* ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) space.
*
*/
#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <que... | ALGO | 0.999973 | 6.357972 | {
"github_metadata": {
"branch": "master",
"commit_count": 261,
"repo_created_at": "2017-04-04T05:59: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": "7b44591d... |
3b52913b-2142-45b3-b1c3-353669498d7a | xing-liu/stokesdt | src/brwn/brwn_chol.cc | /**
* @file brwn_chol.cc
* @brief BrwnChol class implementation
*/
#include <mkl.h>
#include "brwn_chol.h"
#include "mob_matrix.h"
#include "log.h"
#include "profile.h"
namespace stokesdt {
BrwnChol::BrwnChol(const int dim) : dim_(dim)
{
}
BrwnChol::~BrwnChol()
{
detail::AlignFree(cholmat_);
}
bool B... | ALGO | 0.997138 | 6.38067 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2015-06-16T15:19:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d06a16ae... |
54257a4f-7c9a-4684-bb23-06a3773b082f | OU-CLDT-BTL/B-i-T-p-nh-m-8 | BT nhóm CTDL GK/CodeC2/BTH2_BT9.cpp | #include <iostream>
#include <stack>
#include <stdlib.h>
using namespace std;
struct Node
{
int data;
Node* next;
};
typedef struct Node* node;
void init(node& p) {
p = NULL;
}
bool isEmpty(node p) {
return p == NULL;
}
node makeNode(int x) {
node tmp = new Node();
tmp->data = x;
tmp->next = NULL;
return ... | ALGO | 0.999669 | 3.886871 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-08-29T14:16:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "de0a6c29d73d6... |
3e6e5fe6-b8a3-461b-ab29-415c1e35bb56 | vxl/vxl | contrib/brl/bpro/core/vpgl_pro/processes/vpgl_compute_persp_cam_pa_covariance_process.cxx | // This is brl/bpro/core/vpgl_pro/processes/vpgl_compute_persp_cam_pa_covariance_process.cxx
#include <iostream>
#include <fstream>
#include <bprb/bprb_func_process.h>
//:
// \file
// Compute the 3x3 covariance matrix for the principle axis direction
// assuming that the axis direction is normally distributed in a ... | ALGO | 0.995869 | 6.872395 | {
"github_metadata": {
"branch": "master",
"commit_count": 42154,
"repo_created_at": "2013-05-02T18:32:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 250,
"forks": 157,
"issues": 49,
"pull_requests": 0
},
"file_meta": {
"content_id": "94... |
b71f06b6-2b73-433c-85c2-a70f0b9ee773 | kokizzu/kokizzu-benchmark | sort/shell.cpp | // shell.cpp
#include<cstdlib>
#include<cstdio>
#include<deque>
#include<algorithm>
using namespace std;
void shellSortPhase(int a[], int length, int gap) {
int i;
for (i = gap; i < length; ++i) {
int value = a[i];
int j;
for (j = i - gap; j >= 0 && a[j] > value; j -= gap) a[j + gap] = a... | ALGO | 0.998956 | 3.469161 | {
"github_metadata": {
"branch": "master",
"commit_count": 197,
"repo_created_at": "2016-02-27T15:02:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 2,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "79cbdebc... |
98a76389-c8b4-4c2d-9490-67a903c44fa9 | zhanjl/LeetCode | constructBTfromPreorderandInorder.cpp | int preindex = 0;
void findboundary(vector<int> &preorder, vector<int> &inorder, int beg, int end, int val,
int *lb, int *le, int *rb, int *re)
{
int index;
for (index = beg; index <= end; index++)
{
if (inorder[index] == val)
break;
}
int nlb, nle, nrb, nre;... | ALGO | 1 | 5.479172 | {
"github_metadata": {
"branch": "master",
"commit_count": 157,
"repo_created_at": "2014-09-27T13:07: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": "592cdcb8... |
527f32d6-41ff-4761-a8d9-15ae1e441706 | Haoyu-Xiao/Code-in-HIT | HIT_DataStructureAndAlgorithm/homework3/OLGraph.h | #ifndef _OL_GRAPH_H_
#define _OL_GRAPH_H_
#include <vector> // for std::vector
#include <list> // for std::list
#include <stack> // for std::stack
#include <queue> // for std::queue
#include <algorithm> //for max,min
#include <utility> // for std::pair std::make_pair
#include "Graph.h"
#include "MFSet.h" // for MFSet... | ALGO | 0.997126 | 3.689562 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-03-27T11:09:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "88cddf6fb9... |
d751d773-d50e-486d-8389-4ee43eea6353 | AlbionVisual/CPP-course-2023-2024-University-tasks | Course_1/iRunner Competition/Field Characteristics.cpp | #include <iostream>
#include <fstream>
#include <string>
using namespace std;
struct point {
float x, y;
};
void read_test(ifstream& input, point*& verts, point*& points, int& vert_size, int& p_size) {
string buffer;
input >> buffer;
int n = stoi(buffer);
vert_size = n;
verts = new point[n];
for (int j = 0;... | ALGO | 0.979908 | 3.871353 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-04-15T21:10:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "53cddd00571f... |
e7601e06-3479-43fd-a710-ceb30825c490 | minmaxmean/Codeforces | contest/245/d/a.cpp |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef map <int, int> mii;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
int const maxn = int(1e3 + 12);
int const maxb = int(2e6 + 12);
int const inf = int(1e9 + 7);
ll const linf = ll(1e18 + 12);
double... | ALGO | 0.9998 | 3.441968 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2015-06-28T18:20: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": "c6aab4901... |
646e1cb1-df7a-4931-9e65-ccdb0bcfe30c | gwngwn06/learning-cpp | problems/Calc_Distance/Calculate_Distance.cpp | /*
==================================================================================================================================
Calculate the Distance
A Cartesian plane is defined by two perpendicular number lines: the x-axis, which is horizontal, and the y-axis, which is vertical.
Using these axes, we can descr... | ALGO | 0.993467 | 5.385652 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2020-02-07T01:20: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": "5ee936f93... |
f6a00291-db2a-4951-99df-eca7217ebe03 | Aly-Shair/DSA-2 | Lecture 75 Q#2 isTreeHeap.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// Tree Node
struct Node {
int data;
Node *left;
Node *right;
Node(int val) {
data = val;
left = right = NULL;
}
};
// Function to Build Tree
Node *buildTree(string str) {
// Corner Case
if (str.length() ... | ALGO | 0.999833 | 5.495505 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-04-17T15:24: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": "4cd3c9518f63... |
f84a2b36-278f-41bb-903f-c015be5a4a91 | JRgit03/Algorithm | voj/ZZJC11月2号abc训练/abc224_c_Triangle.cpp | /**
* 模拟 三角形判定
* https://atcoder.jp/contests/abc224/tasks/abc224_c
*
* 题意:给你n个点,无重点,求构成合法三角形的个数
*/
#include <bits/stdc++.h>
#define int long long
#define x first
#define y second
using namespace std;
signed main(){
int n; cin>>n;
vector<pair<int,int>> p(n);
for(int i=0;i<n;i++){
int a,b; cin>>a>>b;
p[i] ... | ALGO | 0.999941 | 5.818219 | {
"github_metadata": {
"branch": "master",
"commit_count": 229,
"repo_created_at": "2023-08-28T13:50:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21a1685a... |
eb28e55e-7bbb-430f-b6bd-54e351f9a9de | shubhankar-31/DS-using-cpp | construction _min_heap.cpp | #include <iostream>
#include <cmath>
#include <cstdio>
#include <vector>
#include <array>
#include <queue>
#define space cout<<"\n\n\n\n";
using namespace std;
void heapify(vector<int> &arr, int n, int i)
{
int minimum = i; // Initialize minimum as root
int l = (2 * i) + 1;
int r = (2 * i) + 2;
if (l... | ALGO | 0.999548 | 3.924478 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2020-06-13T15:52: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": "6bddee066... |
a9e70491-b8e2-47c9-b19d-3c9a6d1da231 | Asik8/Phitron-Data-Structure | Binary Tree/Count_Maxmum_Height.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
class Node {
public:
ll data;
Node *left;
Node *right;
Node(ll data) {
this->data = data;
this->left = NULL;
this->right = NULL;
}
};
Node * Input_Tree()
{
int n;
cin>>n;
Node * root;
if(n ... | ALGO | 0.998491 | 3.919338 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-09-01T16:04:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f711d054ebce... |
1d3e94e0-847e-41d3-a9db-1135a39cc5f9 | reo0105/atcoder | contest/2023_12_10_beginner/D.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int h, w;
cin >> h >> w;
vector<vector<int>> a(h, vector<int>(w));
vector<vector<int>> b(h, vector<int>(w));
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> a[i][j];
}
}
for (int i =... | ALGO | 0.999984 | 3.714337 | {
"github_metadata": {
"branch": "main",
"commit_count": 89,
"repo_created_at": "2023-02-12T12:34: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": "a490c8daed0... |
d0d4d9be-0af8-448c-b094-35c9dfe2f9b1 | strn18/cpp_practice | algorithm/Bruteforce/2531.cpp | #include <iostream>
#define PLATE 30000
#define SUSHI 3000
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int N, d, k, c;
int types = 0, maxTypes = 0;
int belt[PLATE], eat[SUSHI+1] = {0};
cin >> N >> d >> k >> c;
for(int i=0; i<N; i++)
cin >> belt[i];
for(... | ALGO | 0.999656 | 3.186672 | {
"github_metadata": {
"branch": "master",
"commit_count": 221,
"repo_created_at": "2023-01-13T07:23: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": "12c30c9c... |
fa38758c-e001-4de1-9f75-57c35e95896e | pszostek/research-python-backup | src/main/python/document_classification/cpp_modules/sim_aggregation.hpp |
#ifndef SIM_AGGREGATION
#define SIM_AGGREGATION
#include <cmath>
#include "matrix_io.hpp"
inline bool custom_isnan(double var) {
volatile double d = var;
return d != d;
}
double sim_aggregation_avg_noweights(const Group& g1, const Group& g2, double** simmatrix) {
double total_sim = 0.0;
for (int i=0; i<... | ALGO | 0.994914 | 4.984001 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2012-09-28T13:35:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd830af47... |
548eee2f-26a1-493f-ad10-e6fe68be666a | antoniocarrillo69/DDM-2D | DDM2DRectangulosParalelo/EjemploDeUso/MatrizDispersaComp.cpp | //////////////////////////////////////////////////////////////////////////////////////////////
// Clase para el trabajar con matrices dispersas de punto flotante //
// //
// Análisis y Diseño y Programación... | ALGO | 0.978789 | 3.633437 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-03-29T13:05:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d921aa9ec... |
fab2da28-91ec-4870-a601-d411f4ddaaaa | yubinbai/pcuva-problems | UVa 10530 guessing game/sol.cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <vector>
#include <map>
#include <set>
#include <math.h>
#define For(a) for ( i = 0; i < a; i++ )
#define Rep(a, b) for ( i = a; i <= b; i++ )
#define N 1000000
using namespace std;
int main ()
{
... | ALGO | 0.998387 | 3.231952 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2013-05-08T15:36:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 50,
"forks": 40,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "f0ffb6e... |
e1d82e04-3b71-4e4e-8bf7-82e7696fa277 | alexandraback/datacollection | solutions_5631989306621952_0/C++/aicioara/a.cpp | #include <iostream>
#include <fstream>
#include <map>
#include <string>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <cmath>
#include <bitset>
#include <list>
#include <queue>
using namespace std;
#define e '\n'
#define INF 1023456789
#define ll long long
//#define FILE "myFile"
#ifdef FILE
if... | ALGO | 0.999931 | 3.948365 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd559c1ed... |
143d4489-ae31-4547-9ad3-09d5c46ed5e0 | tlsgkdns/study | BfsAndDfs/14497_rebellion.cpp | #include <iostream>
#include <queue>
#include <cstring>
using namespace std;
int X1, Y1, X2, Y2, N, M, ans = 0;
bool room[301][301], v[301][301];
char ch;
int dy[4] = { -1, 1, 0, 0 };
int dx[4] = { 0, 0, -1, 1 };
vector<pair<int, int>> prv;
bool inRange(int y, int x)
{
return y >= 0 && x >= 0 && y < N&& x < M;
}
int ... | ALGO | 0.999855 | 3.96292 | {
"github_metadata": {
"branch": "master",
"commit_count": 2028,
"repo_created_at": "2021-02-18T10:49: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": "4908c9d... |
e87c3bb3-7c3d-45bb-adef-f7172424de5d | milderhc/competitive-programming | UVa/11838 - Come and Go.cpp | #include <iostream>
#include <cmath>
#include <vector>
using namespace std;
const int INF = 1000000;
vector<vector<int> > D;
vector<vector<int> > F;
vector<vector<int> > G;
void initialize_distances ( int size ) {
D.clear();
F.clear();
D.resize( size );
F.resize( size );
for ( int i = 0... | ALGO | 0.999944 | 4.275694 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2014-04-04T02:58:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa097b9e8... |
da8a03d8-962a-4397-bfbd-6a3074defa43 | agustinmoretti/UTN | AEDD - Algoritmo y Estructura de Datos/Parciales/19026. Borrado en Lista Enlazada/parcial omega borrar un nodo.cpp | #include <stdlib.h>
#include <iostream>
#include <cstdio>
using namespace std;
struct NodoLista {
int info;
struct NodoLista *sig;
};
typedef NodoLista * NodoListaPtr;
void insertar(NodoListaPtr *sPtr, int valor);
void mostrarLista(NodoListaPtr actual);
void Parcial4(NodoListaPtr *sPtr);
int main() {
... | ALGO | 0.999044 | 3.656123 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2025-02-01T00:08: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": "43af41d64d9... |
b5befdd8-9861-4a89-b18a-8031529d92a3 | Element920/Cpp_Ex2 | Algorithms.cpp | //<EMAIL>
//
// Created by israel on 3/23/25.
//
#include "Algorithms.hpp"
#include "DataStructures.hpp"
#include "Graph.hpp"
#include <climits>
#include <stdexcept>
#include "iostream"
namespace graph {
Graph Algorithms::bfs(const Graph& g, int start) {
int n = g.size();
Graph tree(n);
... | ALGO | 0.999881 | 5.614367 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-05-26T17:43: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": "7a7fad4aa21e... |
753147e2-7f99-415f-a04c-c066ce276219 | aklk1ng/code | cpp/cf/contest/1848/c.cpp | #include <bits/stdc++.h>
typedef long long ll;
void solve() {
int n;
std::cin >> n;
std::vector<int> a(n), b(n);
for (int i = 0; i < n; i++) {
std::cin >> a[i];
}
for (int i = 0; i < n; i++) {
std::cin >> b[i];
}
auto gcd = [&](auto self, int x, int y) {
if (!x) {
return 0;
}
... | ALGO | 0.999937 | 5.054792 | {
"github_metadata": {
"branch": "main",
"commit_count": 495,
"repo_created_at": "2022-02-09T13:42: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": "9b78a890bc... |
a17e20fb-bd8e-4bca-8dbc-c1352750c758 | Yuki-Inoue/sudoku | sudoku.hpp | //
// sudoku.hh
// sudoku
//
// Created by <NAME> on 2013/08/12.
// Copyright (c) 2013年 <NAME>. All rights reserved.
//
#ifndef sudoku_sudoku_hh
#define sudoku_sudoku_hh
#include <vector>
#include "grid2d.hpp"
#include <memory>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include... | ALGO | 0.96326 | 6.4928 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2013-09-08T00:02: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": "71cf8113c... |
839da76b-f2b5-4585-87b2-7bfcf981a37c | mgschwan/blensor | intern/cycles/bvh/bvh2.cpp | /*
* Adapted from code copyright 2009-2010 NVIDIA Corporation
* Modifications Copyright 2011, Blender Foundation.
*
* 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... | ALGO | 0.966084 | 6.529809 | {
"github_metadata": {
"branch": "master",
"commit_count": 56131,
"repo_created_at": "2011-10-10T10:14:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 186,
"forks": 48,
"issues": 27,
"pull_requests": 3
},
"file_meta": {
"content_id": "ae... |
c3172bba-7ff3-4fb6-8e8a-84326dad9702 | caozhaoliang/gateway | cpp-libs/comm/include/string_utility.h | #ifndef __STRING_UTILITY_H__
#define __STRING_UTILITY_H__
#include <string>
#include <vector>
#include <map>
#include <set>
#include <iostream>
#include <fstream>
#include <sstream>
// 不分大小写的字符串比较函数
#ifdef _WIN32
#ifndef STRNCASECMP
#define STRNCASECMP _strnicmp
#endif
#ifndef STRCASECMP
#define STRCASECMP ... | TOOL | 0.961445 | 4.438955 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-03-08T08:06: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": "ff60cd9a11... |
f1d3a1dc-3417-43fc-8871-cfd609b38fc5 | ck89119/Algorithm | Codeforces/r303/div2E.cpp | #include <bits/stdc++.h>
using namespace std;
#define dump(x) cout << __LINE__ << " : "<< #x << " = " << (x) << endl
#define CLR(a, x) memset(a, x, sizeof(a)) //0:0, -1:-1, INF:0x3f, -INF:0x80
#define MP(A, B) make_pair(A, B)
#define PB(A) push_back(A)
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
#... | ALGO | 0.999981 | 3.343488 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2015-01-30T05:58:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c93ad625c... |
ffb4b3d5-1430-45b6-a944-50dfeb5f5f99 | a1983/OrderStatisticRBTree | statistic_rb_tree.cpp | #include "statistic_rb_tree.h"
RBNode* RBNode::null = new RBNode();
RBTreeData::RBTreeData()
: root_{ RBNode::null }
{
}
RBNode* nextNode(RBNode* node)
{
if( node->r != RBNode::null ) {
node = node->r;
while( node->l != RBNode::null )
node = node->l;
}
else {
RBNo... | ALGO | 0.998391 | 4.94698 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2015-09-23T17:03: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": "4411d0ac16... |
f234d581-1cae-404f-a184-e8be3423cd57 | elvircrn/ccppcodes | transformations1.cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <cmath>
using namespace std;
struct Vector2
{
float x, y;
Vector2 () { }
Vector2 (float _x, float _y) { x = _x; y = _y; }
Vector2 operator + (const Vector2 &B... | ALGO | 0.999892 | 3.531691 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-10-14T17:41:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c7e167c595... |
2cc5e08e-4219-445c-805d-f486cab60894 | Prashant-flick/codechef-contest | 173/Overwrite.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 2e5+10;
int n,m;
int arr[N],brr[N],crr[N];
signed main() {
int t;
cin >> t;
while(t--){
cin >> n >> m;
for(int i=0; i<n; i++){
cin >> arr[i];
}
int mini=INT_MAX;
int idx=-1... | ALGO | 0.999978 | 3.393533 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2024-07-19T19:11: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": "7bf47f455... |
863ad312-4375-4658-988c-16f4311e2a94 | ishandutta2007/codeforces-m | mr.robot_28/normal/930/D.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
int ans = 0;
int max(int a, int b)
{
if(a > b)
{
return a;
}
return b;
}
void solve(vector <pair <int, int> > x)
{
multiset <int> a, b;
for(int i = 0; i < x.size(); i++)
{
b.insert(x[i].second);
}
int l = 0;
for(int i = 0; i <= 2000000; i... | ALGO | 0.999842 | 3.9446 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "290bc5891988... |
8cee0a22-ad54-43b6-913e-e25e987d2266 | palilo815/ps | baekjoon/20000/20033.cpp | #include <bits/stdc++.h>
using namespace std;
const int mxN = 3e5;
pair<int, int> a[mxN];
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
#ifndef ONLINE_JUDGE
freopen("in", "r", stdin);
freopen("out", "w", stdout);
#endif
int n;
cin >> n;
for (int i = 0; i < n; ++i)
cin >> a[i... | ALGO | 0.999964 | 4.347652 | {
"github_metadata": {
"branch": "master",
"commit_count": 6725,
"repo_created_at": "2020-01-12T04:58:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2cfa6d9... |
fe382adf-d4fb-45b4-9fd4-022bc8444a35 | LoganAMorrison/blackthorn | old/libbt/src/Models/RhNeutrinoGeV/SquaredMatrixElements.cpp | #include "../Utils.h"
#include "blackthorn/Models/RhNeutrino.h"
namespace blackthorn {
// ===========================================================================
// ---- N -> nu + H ----------------------------------------------------------
// ======================================================================... | ALGO | 0.913906 | 6.053457 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2022-04-04T22:36:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d4cbef77e... |
24b18f0a-e819-4e2b-b528-fcd60e8bb19c | 21F-941921F-9513/Noman | Data Structure code/21F-9513_Rehashing_lab14.cpp | #include <iostream>
using namespace std;
class HashTable {
private:
int tableSize;
int* hashTable;
bool* isOccupied;
int numElements;
const double loadFactorThreshold = 0.7;
public:
HashTable(int size) : tableSize(size), numElements(0) {
hashTable = new int[tableSize];
isOccupied = new bool[tableSize];
for... | ALGO | 0.999851 | 5.842301 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-10-06T10:08:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "178cba33be3e... |
e2efb44c-7c96-4ff9-ad6d-3cffe28ecc28 | rickyyx/competitive | kattis/connectthedots/sol.cpp |
#include <algorithm>
#include <unordered_map>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <iomanip>
#include <sstream>
#define FileIn(file) freopen(file".inp", "r", stdin)
#def... | ALGO | 0.999918 | 3.667782 | {
"github_metadata": {
"branch": "master",
"commit_count": 92,
"repo_created_at": "2016-12-01T15:48:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6b5a5b73a... |
850d4f1c-45b9-430f-94fe-163e567e24ce | leleluv1122/Algorithm | _BAEKJOON_/_BAEKJOON_/1389_케빈베이컨의6단계법칙.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#define MAX 102
#define INF 987654321
using namespace std;
int N, M;
int cnt, step;
vector<int> v[MAX];
bool visited[MAX];
void kevin(int a, int goal, int cnt) {
if (a == goal) {
step = min(step, cnt);
return;
}
for (int i = 0; i < ... | ALGO | 0.999965 | 3.502306 | {
"github_metadata": {
"branch": "master",
"commit_count": 202,
"repo_created_at": "2020-02-05T08:49:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "06da4a62... |
abd5ff62-16c5-4926-880f-48c36ef6bdb3 | TacoL/452-Project | RobberCar/Misc/FFT_final.ino | /*
Example of use of the FFT library to compute FFT for a signal sampled through the ADC.
Copyright (C) 2018 <NAME> and <NAME>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either vers... | ALGO | 0.999247 | 5.720032 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2024-10-28T16:07: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": "29eea0ce7... |
32d27884-449e-408e-b3e4-a5041f4b0850 | ZeroHzzzz/C-homework | pracitce/1103.cpp | #include<iostream>
int num[300],cf[300];
int ans[300];
int main(){
std::string a;
int k;
std::cin>>a;
std::cin>>k;
for(int i=0;i<a.size();i++){
num[i] = a[i] - '0';
}
for(int i=0;i<a.size();i++) cf[i] = num[i+1] - num[i];
// int cnt = 0, ind = 0;
// for(int i=0;i<a.size();i++... | ALGO | 0.99997 | 3.67896 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2023-12-02T09:46: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": "b3b1ecf60ea... |
5b6c5cc5-f491-4bd2-9e7f-eef2e56b7b1b | NVIDIA-Omniverse/PhysX | physx/source/geomutils/src/convex/GuConvexHelper.h | // 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 disclaimer.
// * Redistributions in binary... | ALGO | 0.971233 | 6.791851 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2022-10-04T09:07:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4056,
"forks": 524,
"issues": 38,
"pull_requests": 8
},
"file_meta": {
"content_id": "8b8e73... |
9e8d5412-b41f-4f44-ada1-f3a86b9e8ea1 | mprateek14/LeetCode-Solutions | 106-construct-binary-tree-from-inorder-and-postorder-traversal/106-construct-binary-tree-from-inorder-and-postorder-traversal.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999989 | 6.187597 | {
"github_metadata": {
"branch": "main",
"commit_count": 762,
"repo_created_at": "2022-04-21T11:42: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": "05578667a0... |
8dcd2ff2-a0d4-487d-8bc2-2fce0f8d8c69 | Liby99/FourierDepthOfField | src/intern/utility/Spectrum.cpp | #include "utility/Spectrum.h"
using namespace fdof;
Spectrum::Spectrum(int num) {
for (int i = 0; i < num; i++) {
samples.push_back(vec2(
Sampler::random() * 10 - 5,
Sampler::random() * pi - pi / 2
));
}
}
void Spectrum::transport(float dist) {
for (int i = 0; i < ... | ALGO | 0.923289 | 5.593637 | {
"github_metadata": {
"branch": "master",
"commit_count": 124,
"repo_created_at": "2018-02-05T00:32:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "12f97b5c... |
54277771-c510-464e-a12c-ad8fa45e6ae9 | titastg7/lowLevelDesign | DigitalWallet.cpp | /*##########################################################################
System Requirements
--------------------
1. User Account Management: Manage user account creation and maintenance.
2. Wallet Management: Allow users to add, withdraw, and check balances.
3. Transaction Processing: Handle transactions and maint... | ALGO | 0.978059 | 6.620348 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2024-05-20T10:56: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": "719a35ea378... |
b9279fa6-540e-4c27-9b8a-a55716791f5f | seahorn/seahorn | include/seahorn/Analysis/WeakTopologicalOrder.hh | #ifndef __WEAK_TOPOLOGICAL_ORDER__HH_
#define __WEAK_TOPOLOGICAL_ORDER__HH_
#include "llvm/Support/raw_ostream.h"
#include <deque>
#include <memory>
#include <type_traits>
#include <vector>
#include "seahorn/Support/LlvmBgl.hh"
#include "boost/iterator/indirect_iterator.hpp"
#include "boost/iterator/transform_itera... | ALGO | 0.998403 | 7.337049 | {
"github_metadata": {
"branch": "main",
"commit_count": 2952,
"repo_created_at": "2015-03-01T05:08:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 454,
"forks": 130,
"issues": 21,
"pull_requests": 9
},
"file_meta": {
"content_id": "d94be... |
c7661cea-46fb-4793-b7f4-9c9f802f3d37 | AlbertWang0116/KrwlngsACMFile | ACM-2011-practise/Module/[2]ComputationalGeometry.cpp | //This section is about the incremental method
//calculate the convex of the combine of several half plane, output the number of distinct point at the border, as well as each point and line in counter-clockwise order.
//the answer of lines is in the seq array, the endpoint of line seq[i] is p[i] and p[i+1].
//Caution... | ALGO | 0.999978 | 4.331352 | {
"github_metadata": {
"branch": "master",
"commit_count": 224,
"repo_created_at": "2011-09-08T01:09: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": "6d8dda56... |
75a64062-6eb2-4f42-ab87-4f75343666b9 | Shell-Wataru/AtCoder | ABC/ABC219/D.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <deque>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <cmath>
#include <iomanip>
#include <functional>
#include <random>
#include <stack>
using namespace std;
using ll = long long;
int main()
{
// 整数の入力
ll N, X, Y;
c... | ALGO | 0.99994 | 4.08139 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2017-04-23T13:44:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b25a16e2... |
388a2ae2-434e-4053-8247-449625652173 | ZhouWeikuan/zoj | zju.finished/2276.cpp | #include<iostream>
#include<queue>
using namespace std;
// Dijkstra 求最短路径
enum {
SIZ = 104,
MaxVal = 99999999,
};
struct Node {
int next[2];
};
Node tree[SIZ];
int tab[2][SIZ];
int num;
void dijkstra(int s, int *dis){
queue<int> q;
q.push(s);
int n;
while(!q.empty()){
s = q.front();... | ALGO | 0.999886 | 3.412201 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2009-06-01T02:13:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2ca5d5c1... |
75aae0f7-08f6-4ae6-a553-cec55633e794 | Insh72amim/cpp | multithreading/leetcode/print_zero_even_odd.cpp | #include <iostream>
#include <mutex>
#include <thread>
#include <condition_variable>
using namespace std;
void printNumber(int x) { cout << x; };
class ZeroEvenOdd
{
private:
int n;
int x;
mutex m;
condition_variable cv;
public:
ZeroEvenOdd(int n)
{
this->n = n;
x = 1;
}
... | ALGO | 0.999765 | 5.565871 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-10-29T16:06: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": "db6121208dde... |
eb2d1900-cf63-4a00-af74-79b7a5ce54c6 | GatoMoon18/algoritmia2.0 | parcial1.cpp | #include <iostream>
using namespace std;
int main(){
// PEDIR EL NUMERO:
int cifras = 0;
long n;
do {
cout << "Ingrese el numero n: ";
cin >> n;
} while (!(n>=100));
int original = n;
// CONTAR CIFRAS:
int temp = n;
while (temp > 0) {
temp /= 10;
cifra... | ALGO | 0.999928 | 4.501287 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-04-28T15:57: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": "1f014ba84e66... |
d6364f53-7f95-48ee-a80f-439311dee302 | Sreyas-108/Maze-solver | maze_solver.ino | int relay1=6;
int relay2=9;
int relay3=5;
int relay4=3;
int echo_front=7;
int trig_front=8;
int echo_left=10;
int trig_left=11;
int echo_right=12;
int trig_right=13;
long time_front,distance_front,minimum_front,distance_left,minimum_left,time_left,distance_right,minimum_right,time_right;
int note=0;
boolean deadend=fa... | ALGO | 0.998303 | 4.361132 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-03-22T05:14: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": "fc96283f37... |
f69effc2-b879-4805-b9b1-7dacfcdce023 | mkltaneja/Leetcode | Weekly_Contest_#275/2135. Count Words Obtained After Adding a Letter.cpp |
#define ull unsigned long long
int primes[26] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101};
int wordCount(vector<string> &startWords, vector<string> &targetWords)
{
unordered_map<ull, int> m;
for (string s : targetWords)
{
ull x = 1;
... | ALGO | 0.999652 | 4.85503 | {
"github_metadata": {
"branch": "master",
"commit_count": 2991,
"repo_created_at": "2020-04-15T14:34:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "61dda05... |
4fba8ac1-6242-4cc8-bf7f-b1907a4a5d60 | ishandutta2007/codeforces-m | maximumshot/normal/839/B.cpp | #include <bits/stdc++.h>
using namespace std;
#define vec vector
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
typedef long double ld;
typedef pair< int, int > pii;
typedef pair< long long, long long > pll;
int const inf = 1000 * 1000 * 1000;
ll const inf64 = 1ll * inf * inf;
int n, k;
int main() {
... | ALGO | 0.99997 | 3.950181 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "95be74f5a98a... |
de6756ae-54b5-4b02-9161-601b5f2572b4 | BangYunseo/BOJ-note | 백준/Silver/1935. 후위 표기식2/후위 표기식2.cc | #include <iostream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int N;
string word;
// N값과 스택에 삽입할 문자열
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cin >> N >> word;
// 입력
double arr[26] = {0, };
// 1부터 26까지 피연산자의 개수를 입력받을 수 있는 배열
for(int i = 0; i < N... | ALGO | 0.999919 | 3.987374 | {
"github_metadata": {
"branch": "main",
"commit_count": 1029,
"repo_created_at": "2023-10-15T07:11: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": "adcb47a6c... |
3a57c352-9477-4d90-afe6-7560c1ab79dd | vrushalingale/https-github.com-AkashSingh3031-The-Complete-FAANG-Preparation | 3]. Competitive Programming/04]. GeeksforGeeks/3]. Must Do Coding Questions/02]. Array/1]. Easy/C++/Rotate_Array.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution
{
public:
//Function to rotate an array by d elements in counter-clockwise direction.
void rotateArr(int arr[], int d, int n)
{
// code here
int temp[d];
for(int i=0; i<d; i++)
temp[i] = arr[i];
for(i... | ALGO | 0.999973 | 5.385991 | {
"github_metadata": {
"branch": "master",
"commit_count": 910,
"repo_created_at": "2021-09-02T10:24:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6ab7309... |
fad18ac0-6a48-43fc-bcd2-ed8a74defe43 | IljaSir/CopilotSolverForLeetCode | C++/Medium/RuntimeError/reachable-nodes-with-restrictions_3.cpp | class Solution {
public:
int reachableNodes(int n, vector<vector<int>>& edges, vector<int>& restricted) {
vector<vector<int>> g(n);
for (auto &e : edges) {
g[e[0]].push_back(e[1]);
g[e[1]].push_back(e[0]);
}
unordered_set<int> rs(restricted.begin(), r... | ALGO | 0.999933 | 5.714233 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-07-28T08:23: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": "b641745a89f8... |
f31f7db4-81e9-4e36-9d36-4dac8a477de6 | Sourav9063/Cpp-All-codes | Algorithm 2.2/Segment Tree/Lazy_Propagation.cpp | // Name: <NAME>
#include <bits/stdc++.h>
using namespace std;
#define ll long long int //lld
#define ull unsigned long long int //llu
#define pt cout << "*" \
<< "\n";
#define nl cout << "\n";
#define deb(x) cout << #x << "=" << x << "\n";
#define pb(a) emplace_back(a)
... | ALGO | 0.999983 | 4.168888 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2020-02-28T05:22:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "be6513524... |
919a487f-ac55-41eb-9d3c-cf550df40029 | wangruihan2024/ACMOJ-Assembly | 1784 20241213.cpp | #include <iostream>
using namespace std;
int a[11][11], b[11][11];
bool suit(int x, int y, int num) {
for (int i = 1; i <= 9; i++)
if(i != x && b[i][y] == num)
return false;
for (int i = 1; i <= 9; i++)
if(i != y && b[x][i] == num)
return false;
int x_region, y_regio... | ALGO | 0.999954 | 4.339285 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2025-03-03T05:30:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4256a138ac... |
11356425-d307-4079-81df-7b1c2675e0fa | AndyFernandes/programming-lab | SearchPadroesInString/ForcaBruta.cpp | // By <NAME>, may/2019
#include <iostream>
#include <string.h>
#include "instancias_Reais_Trabalho_2.hpp"
using namespace std;
void ForcaBruta(const char *texto, const char *padrao, int *saida){
int posicao_ocorrencia = 0; // guarda a posicao do texto em que comecou a ocorrencia do padrao
int posicao_corrente... | ALGO | 0.999485 | 3.697305 | {
"github_metadata": {
"branch": "master",
"commit_count": 128,
"repo_created_at": "2019-02-21T19:44:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4cc5abe... |
2baf15d0-3baf-4ea5-903d-1a4030ca2904 | raincross7/code-similarity | codes/train_code/problem116/problem116_482.cpp | /*
-ensure correct output format
-ensure printing required output
-reread the problem statement
*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll>pll;
typedef pair<ll,pair<ll,ll>>plll;
#define fastread() (ios_base:: sync_with_stdio(fa... | ALGO | 0.999957 | 3.561903 | {
"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": "83d34fcb3da6... |
c604fe65-e7f5-4854-9bb7-a3ebbc402bc5 | Qiaochu-Zhang/Some-stuff | listFuncs.h | // Name: <NAME>
// USC NetID: qzhang40
// CSCI 455 PA5
// Fall 2023
//*************************************************************************
// Node class definition
// and declarations for functions on ListType
// Note: we don't need Node in Table.h
// because it's used by the Table class; not by any Table clie... | TOOL | 0.95751 | 4.853988 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-12-16T03:30: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": "291416cf0c1... |
031b1335-df98-469e-bc7b-8e0b7ebeb2b5 | jackkhua/ECE250 | Bonus Project Trie attached files Nov 8, 2018 540 PM/Trie.h | /*****************************************
* Instructions
* - Replace 'uwuserid' with your uWaterloo User ID
* - Select the current calendar term and enter the year
* - List students with whom you had discussions and who helped you
*
* uWaterloo User ID: <EMAIL>
* Submitted for ECE 250
* Department of Elect... | ALGO | 0.974007 | 4.791788 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-11-13T01:29:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8d899e9b8... |
aee9fe11-b423-4ca4-b2a7-876c286a6599 | TAMANNA230904/Data-Structures | Arrays/Array is a Subset of other Array.cpp | Given two arrays: a1[0..n-1] of size n and a2[0..m-1] of size m. Task is to check whether a2[] is a subset of a1[] or not.
Both the arrays can be sorted or unsorted. There can be duplicate elements.
//{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
string isSubset(int a1[], int a2[], int n, int m) ... | ALGO | 0.999985 | 6.094599 | {
"github_metadata": {
"branch": "main",
"commit_count": 122,
"repo_created_at": "2023-10-23T15:56: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": "32ab03470c... |
ae45b66d-25ae-413e-aaf2-67e77d6b3d4b | daminigarg07/Cpp-Pirates-of-the-Code-ibbean- | practice/maths/prime pairs.cpp | #include <bits/stdc++.h>
using namespace std;
/*We create a boolean vector isPrime of size N+1, initialized to true.
We iterate through numbers from 2 to sqrt(N) (inclusive).
For each prime number found (starting from 2), we mark all its multiples as not prime.
After completing the above step, we collect all remainin... | ALGO | 0.999927 | 4.533062 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2024-09-22T18:55:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f165691b09... |
02bf9296-7ca9-4e71-9a32-3175137bebf2 | YnkDK/BioSeq-Project3 | src/main.cpp | /* -------------------------------------------------------------------------------------
** This software is implemented as part of the course
** Algorithms in Bioinformatics - Sequences Q1/2015
** at Aarhus Univerity Denmark.
**
** main.cpp
** Main file
**
** Author: <NAME>, <NAME> and <NAME>
** ------------------... | ALGO | 0.993195 | 4.161359 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2015-09-21T08:31: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": "2f59090f5... |
f316f653-a852-44a2-aefc-0c80265f4936 | sherif17/Problem_Solving_PST | Level_II/Summer/Week_1/Part_I/Sheet_1_STL_1/D_Array/Array.cpp | #include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
void fastIO() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
freopen("error.txt", "w", stderr);
#endif
}
int main() {
fast fastIO();
int n;
cin >> n;
... | ALGO | 0.999936 | 3.710287 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2021-07-28T21:20:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "065a3015e... |
f3b95c05-1fda-4cb6-8e81-940bae41ca4f | tyler-ross26/CS303Assignment3 | CS303Assignment3.cpp | // Name: <NAME>
// Date: 11/12/2024
// CS303 Assignment 3
#include "Queue.h"
#include "linear_search.h"
#include <iostream>
#include <vector>
using namespace std;
int main() {
// Create a queue and add 10 integer values
Queue<int> q;
for (int i = 1; i <= 10; i++) {
q.push(i); // Insert integers f... | ALGO | 0.991363 | 5.361331 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-11-13T03:03: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": "c86a2fab84bc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.