uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
b0d910ba-120f-4071-9bb1-d57089b8a560 | MatSobol/Snake | main.cpp | #include "raylib.h"
#include "math.hpp"
#include "snake.hpp"
#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#define DEFAULTWIDTH 1920
#define DEFAULTHEIGHT 1080
#define WALL_SIZE 17
#define WALL_OFFSET 40
#define PI 3.14159265358979323846f
const Vector2 virtualSize = {1920, 1080};
int scor... | TOOL | 0.926667 | 5.699375 |
45468888-a647-4255-bf61-05fa6ab379ad | ljyslyc/data-structure | 综合实验/huffmanty/huffmanty/huffmantree.cpp | #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include"huffmantree.h"
#include<string.h>
#include<iomanip>
#define OK 0
#define BYTESIZE 256
#define MAXVALUE 999999
using namespace std;
//huffmantree
int CreateHuffmanTree(HuffNode *huf_tree, int n)//huffman
{
int i;
int s1, s2;
for (i = n; i <... | ALGO | 0.999902 | 3.164671 |
cac4038d-85e0-4adb-8d5b-78e77b081d79 | BabakAkbari/Tiny-LB-MPC | include/Eigen/unsupported/test/NonLinearOptimization.cpp | #include <stdio.h>
#include "main.h"
#include <unsupported/Eigen/NonLinearOptimization>
// This disables some useless Warnings on MSVC.
// It is intended to be done for this test only.
#include <Eigen/src/Core/util/DisableStupidWarnings.h>
// tolerance for checking number of iterations
#define LM_EVAL_COUNT_TOL 2
#... | TEST | 0.968417 | 7.066195 |
42f6c0b0-ef25-4026-b0e4-001895483585 | carlosgarmer/tc1031 | grafo.cpp | // Carlos Garcia Mercado A01633757
// 19 de noviembre del 2021
#include <vector>
#include <iostream>
using namespace std;
// Esta clase describe un grafo como una lista de adyadencia donde cada indice
// del vector principal indica el nodo y el vector interior indica los nodos con los
// que tiene conexión
class Gra... | ALGO | 0.998018 | 5.305615 |
e58a2247-7a05-4bba-8191-686d42b94fbf | MOHANAPRIYA-0106/cpp_Training | assignments/Day10/recursive.cpp | /*
Problem 1: Print Numbers from N to 1
Problem Statement:
Write a recursive function to print numbers from N down to 1.
#include<iostream>
void printNumbers(int n);
using namespace std;
void printNumbers(int n)
{
int n = 0;
if (n == 0) {
cout << "Enter the number:" << endl;
cin >> n;
return;
}
cout... | ALGO | 0.999772 | 5.129714 |
9dd62958-eee2-499d-b6dc-d2b500a9b5fe | istiaqueahmedarik/Phitron | week16/diff_seg.cpp | /*******************************************
@b |I|s|t|i|a|q|u|e| |A|h|m|e|d| |A|r|i|k|
********************************************/
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
void _... | ALGO | 0.999922 | 4.778441 |
e8892c6d-af26-4d8a-a144-fa3f038ce35a | Gilgameshgb-1/ProgrammingTechniques | T2/Z2/main.cpp | //TP 2017/2018: Tutorijal 2, Zadatak 2
#include <iostream>
#include <vector>
bool TestPerioda(std::vector<double> v,int p)
{
if(p>=v.size()) return false;
int z = 0;
if(p==0) return false;
for(int i=p; i<v.size(); i++) {
if(v[z]!=v[i]) {
return false;
}
z++;
}
... | ALGO | 0.999379 | 4.471039 |
d2c9ff18-1e5c-4f05-a6ff-de3410d83b0f | yashgovani/data-structure-algorithm | Bit Manipulation/dec-to-bin.cpp | #include <iostream>
#include <math.h>
using namespace std;
int main()
{
int n;
cin >> n;
int ans = 0, i = 0;
while (n != 0)
{
int bit = n & 1;
ans = (bit * pow(10, i)) + ans;
n = n >> 1;
i++;
}
cout << "ans is: " << ans;
} | ALGO | 0.999881 | 4.314032 |
0ab2ae68-e761-4c81-aac7-13227b8e20c9 | PaoloJr/concordiaCS | 5421/a5/a5.cpp | #include "a5.h"
#include <algorithm>
#include <cctype> // isalpha(), tolower()
#include <fstream>
#include <functional> // bind()
#include <iostream>
#include <set>
#include <stdexcept>
#include <iterator>
// #include <ostream>
// task 1 - using std::copy to extract words from file
WordVec read_words_into_vector(const... | TOOL | 0.887835 | 6.102731 |
9501c158-23fe-430c-8de3-fc05bb000a75 | yhx9527/pat | PAT-A1135/main.cpp | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
struct node {
int val;
struct node*left;
struct node*right;
};
node* build(node *&root, int val){
if(root==NULL){
root=new node();
root->val = val;
root->left=root->right=NULL;
} else {
if(ab... | ALGO | 0.999983 | 3.763539 |
3d2b6bc7-14cf-4aa1-aacc-c41bb001b1b3 | girikgarg8/DS_Algo | Connected_Components_BFS.cpp | #include <bits/stdc++.h>
using namespace std;
class Graph{
map <int,list<int> > mp;
map <int,bool> visited;
queue <int> q1;
public:
void addEdge(int a,int b,bool isBidirectional=true){
mp[a].push_back(b);
if (isBidirectional){
mp[b].push_back(a);
}
}
void ... | ALGO | 0.999504 | 5.362772 |
838c71d2-23b2-413f-ae49-61f44018141a | yliow/spring2023-ciss240 | 2023-03-15/main.cpp | #include <iostream>
#include <cmath>
bool isprime(int n)
{
if (n < 2)
{
return false;
}
else
{
for (int d = 2; d <= sqrt(n); ++d)
{
if (n % d == 0)
{
return false;
}
}
}
return true;
}
int m... | ALGO | 0.999609 | 4.851098 |
e761aefc-7072-4a02-a98e-3d7ce7eae219 | shantanu1807/Top-Interview-150-Question | 3636-check-balanced-string/3636-check-balanced-string.cpp | // Note => 1 The stoi function should not be used directly on a character. Instead, you should convert the character to an integer by subtracting the character '0'.
// 2. The stoi function is meant for strings, not single characters.
class Solution {
public:
bool isBalanced(string num) {
int n = num.si... | ALGO | 0.999597 | 6.040984 |
f439966a-51a1-446c-9fcb-b42083e701bc | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_10491_2.cpp | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;
long long int mod = 1e9 + 7;
long long int n,m;
long long int a[200005];
bool cmp(int x, int y)
{
return abs(x) < abs(y);
}
int main()
{
int pn=0 ,nn = 0;
//pn正数,nn负数;
cin >> n >> m;
for (int i = 1; i <= n; i++)
{
cin... | ALGO | 0.999997 | 3.76928 |
2f8b952e-1ea0-4fd4-a5dc-62dff7455220 | vishalalpuria/cap455 | NEOCOLAB/neoque16.cpp | #include <iostream>
using namespace std;
inline int isLeapYear(int year){
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
cout << year << " is a leap year.";
else
cout << year << " is not a leap year.";
return 0;}
int main()
{
unsigned int y = 0;
cin >> y;
isLea... | ALGO | 0.999612 | 3.998661 |
677fa038-bb96-408d-b760-500f100471b8 | SuyeonShinnnn/BaekJoon | 1181.cpp | // 단어 정렬
#include <iostream>
#include <set>
using namespace std;
struct compare{
bool operator() (const string& a, const string& b) const{
// a길이 < b길이 -> true
if(a.length() < b.length())
return true;
// 길이 같으면 사전 순으로
else if(a.length() == b.length()){
retu... | ALGO | 0.999741 | 4.745764 |
028f46f3-088e-4fd0-8fc1-62418fa71f2d | deepin-community/scilab | scilab/modules/scicos_blocks/src/cpp/fromws_c.cpp | #include <cmath>
#include <cstring>
#include "Helpers.hxx"
#include "context.hxx"
#include "types.hxx"
#include "double.hxx"
#include "int.hxx"
extern "C"
{
#include "dynlib_scicos_blocks.h"
#include "expandPathVariable.h"
#include "scicos_block4.h"
#include "scicos_evalhermite.h"
#include "scicos.h"
#include "sci_m... | ALGO | 0.970359 | 3.810886 |
a9ea642b-9e63-41e5-a337-7b1d8cdc185d | diegougu/codigosxd2 | PilaEnlazadaConArrays_37min.cpp | #include <iostream>
using namespace std;
template <class T>
struct arrnode {
const static int tam = 5;
T arr[tam];
T* top = arr;
arrnode<T>* next = nullptr;
};
template<class T>
class PilaArray {
private:
arrnode<T>* head = nullptr;
public:
void push(T v);
bool pop(T& v);
void print();
};
template <class T>... | ALGO | 0.999577 | 3.907669 |
e711a666-fada-4661-b2f6-2651cd96effd | NuoJohnChen/C2HLS | data/argumentation_example/polybench/doitgen/true/generate_9/doitgen.cpp | #include "doitgen.h"
void compute_sum_tile(int r, int q, int s, double A[25][20][30], double C4[30][30], double sum[30]) {
#pragma HLS INLINE
double a_val = A[r][q][s];
for (int p = 0; p < 30; p += TILE_P) {
#pragma HLS UNROLL factor=TILE_P
for (int p_in = 0; p_in < TILE_P; p_in++... | ALGO | 0.999615 | 4.846702 |
997b7c7d-7c73-47ae-859d-dd55fefed043 | WZSLYF/oi | codeforces/574/574.C/574.C.cpp | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n;
long long f[maxn][2], dat[maxn][2];
int main() {
scanf("%d", &n);
for(int i = 0; i < n; ++i) scanf("%I64d", &dat[i][0]);
for(int i = 0; i < n; ++i) scanf("%I64d", &dat[i][1]);
f[0][0] = dat[0][0];
f[0][1] = dat[0][1]... | ALGO | 0.999955 | 3.549521 |
b996eac4-6341-4fee-a0ca-e88249b22cd5 | aniket-p29/CPP | FUNOVER.CPP | #include<iostream.h>
#include<conio.h>
class fundemo
{
public:
void swap(int &,int &);
void swap(char &,char &);
void swap(float &,float &);
};
void fundemo :: swap (int &a, int &b)
{
int t;
t=a;
a=b;
b=t;
}
void fundemo::swap(char &p,char &q)
{
char t;
t=p;
p=q;
q=t;
}
void fundemo ::... | ALGO | 0.995523 | 4.19502 |
9af8f7a2-448f-4c65-9129-94f1eb54a4e5 | HKABIG/DSA | 334.Triplet_Subsequence.cpp | class Solution {
public:
bool increasingTriplet(vector<int>& nums) {
int f = INT_MAX;
int s = INT_MAX;
for(int i:nums){
if(i<=f){
f = i;
}
else if(i<=s){
s = i;
}
else{
return true;
... | ALGO | 0.999973 | 5.788729 |
acd12427-80ab-4b60-b5e2-e0875ca5f7ef | marwan-abdellah/Dummy | Benchmarking/cuFFTShift_2D/runComplexSingleSeq.cpp | /* @ Maximum dimensions in 2D */
#define N_2D_MAX 2048
/* @ Maximum CUDA block dimensions in 3D */
#define MAX_BLOCK_SIZE_X 16
#define MAX_BLOCK_SIZE_Y 16
#define MAX_BLOCK_SIZE_Z 1
#define MAX_GRID_SIZE_X 65535
#define MAX_GRID_SIZE_Y 65535
#define MAX_GRID_SIZE_Z 1
/* @ Considering the UNIFIED 2D case*/
#define MA... | ALGO | 0.880758 | 3.107089 |
d427308b-a528-494a-aff1-9cb628082ba9 | Hariom-Nagar211/Data-Structures-and-Algorithms | 46_BinaryTree_Height/3_Diameter_of_BT.cpp | #include<bits/stdc++.h>
using namespace std;
// Que: Find the diameter of a BT.
struct node
{
int data;
struct node* left;
struct node* right;
node(int val)
{
data = val;
left = nullptr;
right = nullptr;
}
};
// Brute
int max_diameter = 0;
int DiameterOfBT1(node* roo... | ALGO | 0.999892 | 5.436338 |
9a40f711-84e0-4d88-801a-8a81c03ad4c1 | lulab/RME | RNAstructure-src/pfunction/partition.cpp | /*
* A program that calculates the partition function for a strand of nucleic acids.
* This strand of nucleic acids can be composed of either DNA or RNA.
*
* (c) 2009 Mathews Lab, University of Rochester Medical Center.
* Written by Jessica S. Reuter
*/
#include "partition.h"
///////////////////////////////////... | ALGO | 0.995074 | 6.89991 |
1c7cc4f1-017e-48de-9a65-ad1e6a89f3a9 | eberan/urho3d_old_mirror | Source/ThirdParty/Bullet/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp | #include "btOptimizedBvh.h"
#include "btStridingMeshInterface.h"
#include "LinearMath/btAabbUtil2.h"
#include "LinearMath/btIDebugDraw.h"
btOptimizedBvh::btOptimizedBvh()
{
}
btOptimizedBvh::~btOptimizedBvh()
{
}
void btOptimizedBvh::build(btStridingMeshInterface* triangles, bool useQuantizedAabbCompression, const ... | ALGO | 0.98248 | 6.574245 |
6fb3abae-d384-465b-a1ad-58359c4c60b8 | Gee-lucky/leavesdiseasedetection | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.9988 | 6.76073 |
032f6a32-0271-4cdb-85c5-587495aec0ea | ralucaguran/leetcode | tree.cpp | #include <stdlib.h>
#include <iostream>
#include <vector>
#include <forward_list>
#include <queue>
#include <algorithm>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
~TreeNode() {
delete left;
... | ALGO | 0.999699 | 5.191701 |
fdc7425d-2702-47f9-9e95-1a1438463724 | k0src/COSC-2436 | dlab3/dlab3_1/main.cpp | #include <stdio.h>
#include <stdlib.h>
// VECTORS/MAPS + CIN + COUT WAS 0.01 SECONDS TOO SLOW, USING C ARRAYS WORKS LOL
using llu = unsigned long long;
llu maxGCD(llu* arr, llu n) {
llu max = 0;
for (llu i = 0; i < n; i++) {
if (arr[i] > max) {
max = arr[i];
}
}
llu* freq... | ALGO | 0.999795 | 4.272473 |
0daa6372-e2fa-4702-be8a-f4a0382bb772 | cycleke/OI_Documents | Code/mzoj/1016.cpp | #include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define N 100010
#define SN 500
int v[N], add[SN], d[N], block;
int l[SN], r[SN], belong[N];
int ina; char inc, inb[1<<16], *ins = inb, *ine = inb;
#define getc() ((ins==ine&&(ine=(ins=inb)+fread(inb,1,1<<16,stdin),ins==ine... | ALGO | 0.99993 | 3.810659 |
8d5c52f8-11ee-4d8f-9c15-ea45f75f4415 | rishabhpahwa/Internship | DLib/src/main.cpp | /*
* main.cpp
* (Source File)
* ------------------
* To test the DlibFaceDetect code on a set of images, this main file was
* created. Provide as a command line argument the directory path to images
* and it'll recursively traverse the directory for images and detect faces
* in them.... | DATA | 0.853746 | 4.801849 |
7fb5a46b-febe-42d6-8717-dd88e6e493df | nolan0801/Competitive-Programming | Codeforces/Div2/771/B.cpp | /*
Author : vidut_206_CNH
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define gcd(a,b) (__gcd(a,b))
#define lcm(a,b) (a/gcd(a,b)*b)
#define sz(x) (int)(x.size())
#define fast_cin() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#... | ALGO | 0.999978 | 4.325046 |
4aeff355-7f13-45cf-8291-86b3126d39c7 | eyk-1/swag-chess | Chess/Game.cpp | #include "Game.h"
#include "Moves.h"
#include "Rook.h"
#include "Pawn.h"
#include "King.h"
#include "Queen.h"
#include "Knight.h"
#include "Bishop.h"
#include "Board.h"
#include <iostream>
#include <cctype>
#include <limits>
#include <cstdlib>
#include <ctime>
#include <string>
#include <vector>
#include <algorithm>
us... | ALGO | 0.9951 | 4.767511 |
1479a48d-8c8c-4551-a301-12b35452314b | demetresalx/SysproAssign2 | bbst.cpp | #include "bbst.h"
//GIA TO DENTRO
BBST::BBST(){
date = NULL;
list_of_records = NULL;
left_child = NULL;
right_child = NULL;
}
//constructor basei eggrafhs
BBST::BBST(record * rec){
date = new std::string(rec->get_entryDate());
list_of_records = new reclist(rec);
left_child = NULL;
right_child = NULL;... | ALGO | 0.976514 | 3.687981 |
810d3fcd-69cf-481d-ba32-51a197b082e6 | BerthaRenner/algorithm-stone | user/leetcode/745.前缀和后缀搜索.cpp | /*
* @lc app=leetcode.cn id=745 lang=cpp
*
* [745] 前缀和后缀搜索
*/
// @lc code=start
#define TRIEN 29
int mydata[2500*TRIEN]={0},cnt;
class WordFilter {
void reset(){
memset(mydata,0,sizeof(mydata));
cnt=1;
}
int* operator[](int i){
return mydata+i*TRIEN;
}
void insert(const ... | ALGO | 0.999894 | 6.215855 |
643402c4-e960-4226-890a-c85f7ac46dcb | FlyingFish-233/THU-HumanResourceMachine-Reproduction | 源代码/final_homework/runningGUI.cpp | #include "ImageProcess.h"
// 0ʾûб仯1ʾ½У-1ʾ˳
int mouse_run_button(bool& single_step_run, int& animation_speed, Image runbutton[], bool is_waiting)
{
if (!MouseHit()) return 0;
MOUSEMSG msg = GetMouseMsg();
FlushMouseMsgBuffer();
if (msg.uMsg == WM_LBUTTONDOWN) {
if (is_waiting && runbutton[0].isMouseOver(msg.x, ms... | ALGO | 0.95752 | 3.214524 |
f4641636-179a-44b2-ba92-a5b549b8a87d | S1ckick/BulbSchedule | src/bysolver.cpp | #include "algos.h"
#include "ortools/base/logging.h"
#include "ortools/sat/cp_model.h"
#include "ortools/sat/cp_model.pb.h"
#include "ortools/sat/cp_model_solver.h"
#include "ortools/util/sorted_interval_list.h"
extern timepoint START_MODELLING;
using namespace operations_research;
using namespace operations_researc... | ALGO | 0.999805 | 4.94486 |
a8ef9ddc-613e-43e2-82d9-de4b4f13998a | v21k93/tbc-core | src/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp | /* ScriptData
SDName: Boss_Jeklik
SD%Complete: 95
SDComment: Timers need to be verified.
SDCategory: Zul'Gurub
EndScriptData */
#include "ScriptPCH.h"
#include "zulgurub.h"
enum Texts
{
SAY_AGGRO = -1309002,
SAY_RAIN_FIRE = -1309003,
SAY_DEATH = -1309004
};
enum Spells
{
SPELL_CHARGE ... | TOOL | 0.866954 | 4.041026 |
7ccaff03-d5c4-4f55-b3e1-be1f7cff9af0 | VidurangaLakshan/mad_cb011181 | untitled/windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998262 | 6.76073 |
994a92b4-ac6b-408a-aed7-8f5962d92f66 | Xenawn/Algorithm | BOJ_Cpp/4153.cpp | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b, c;
while (true) {
cin >> a >> b >> c;
if (a == 0 && b == 0 &&c == 0)
break;
if (a > b && a > c) {
if (a * a == b * b + c * c) {
cout << "right" << '\n';
continue;
}
else {
cout << "wrong" << '\n';
... | ALGO | 0.99992 | 3.465835 |
b6dcaa70-553b-44a7-89ec-ed0ebd58b185 | Asem758/csc101-c-plus-plus-course-problem- | Personal_Practice/Prime_or_not.cpp | #include <iostream>
using namespace std;
int main() {
for (int n = 2; n < 20; ++n)
{
int isPrime = 1;
for (int i = 2; i < n; ++i)
{
if (n % i == 0)
{
isPrime = 0;
}
}
if (isPrime == 1)
cout << n <<"is Prime " <<endl;
else
... | ALGO | 0.992625 | 4.224449 |
b6ed98f4-a436-4d9b-8605-c5a98880d384 | DandyCreater/SahamRakyatMobileTest | mobile_dev_test/windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998207 | 6.785645 |
4440841d-6e27-4368-bdb0-d006085d8a8f | sahilsujeet1/DSA_Prep2023 | Graphs/wordLadderII.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
vector<vector<string>> findSequences(string beginWord, string endWord, vector<string>& wordList) {
// code here
unordered_set<string> st(wordList.begin(), wordList.end());
queue<pair<vector<string>, int>> q;
vecto... | ALGO | 0.999979 | 5.39862 |
d2f01ee4-7dd5-4108-8af0-89fbf38329a9 | calubtus/gem5_cache_partitioning | src/systemc/tests/systemc/misc/v1.0/dash4/pulse.cpp | /*****************************************************************************
pulse.cpp -- Implementation of the pulse generator.
Original Author: Ali Dasdan, Synopsys, Inc.
*****************************************************************************/
/*****************************************************... | TOOL | 0.925929 | 6.367835 |
5b0556b2-cd33-4f0c-b070-c84a40666a04 | OneGitter/CrackYourPlacement | leetcode/rotate-image/rotate-image.cpp | class Solution {
public:
void rotate(vector<vector<int>>& matrix) {
int n = matrix.size();
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
swap(matrix[i][j],matrix[j][i]);
}
}
for(int i=0;i<n;i++){
for(int j=0;j<n/2;j++){
... | ALGO | 0.999986 | 6.354636 |
ec8a0a17-aeb2-4d0e-8ac3-906d1d8fb88c | dhruvinj/Projects | Projects/algorithmDataStruct/Datastructures/Queues/queues.cpp | #include<iostream>
#include<vector>
class Queue
{
private:
int max_size;
std::vector<int> A;
int front, rear;
public:
// Constructor - creating queue of user size, set front and rear as -1.
// We are assuming that for an empty Queue, both front and rear will be -1.
Queue(int size)
{
max_size = size;
A.rese... | ALGO | 0.959785 | 4.298572 |
3abaf212-3721-4aba-84b1-57f686fcee23 | Connolyn/consultaPAP | P2/Aulas/14 - ???/Aula13-06.cpp | //============================================================================
// Name : Aula13-06.cpp
// Author : Prof. Alexandre Donizeti Alves
//============================================================================
//****************************************************************************
// ... | ALGO | 0.99988 | 5.150661 |
31173231-b483-4f63-8382-46876ee4292a | dhruvalthakor/DSA | lec9.1/lec9-1.cpp | #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
// pointer
int *ptr;
int a=5;
ptr=&a;
cout << "Address is: " << ptr;
//2 pointer
int a=5;
int *ptr;
ptr=&a;
cout << "value is: "<< *ptr;
//qus-3 pointer
int a=5;
int *p;
p=&a;
printf("Address is %d\n",p);
printf("... | TOOL | 0.989423 | 3.14369 |
ab91acb5-caf9-4b4f-8972-45a9983717e8 | AbhishekSinghDev/dsa-notes | lecture 5/numberOfSetBits.cpp | #include<bits/stdc++.h>
using namespace std;
int main() {
unsigned int n = 0b11111000;
int ans = 0;
while(n != 0) {
if(n & 1) ans++;
n >>= 1;
}
cout<<"Number of set bits: "<<ans;
return 0;
} | ALGO | 0.999532 | 4.739498 |
e0b48d99-2c8c-4749-aa20-b40ffefe3208 | sarvex/leetcode-odin | solution/1200-1299/1239.Maximum Length of a Concatenated String with Unique Characters/Solution.cpp | class Solution {
public:
int maxLength(vector<string>& arr) {
int ans = 0;
vector<int> masks = {0};
for (auto& s : arr) {
int mask = 0;
for (auto& c : s) {
int i = c - 'a';
if (mask >> i & 1) {
mask = 0;
... | ALGO | 0.999946 | 5.623845 |
6b278fe4-0af6-4a17-89a6-fc9c9ab48c10 | EneRgYCZ/Problems | Problema_3215/Problema_3215.cpp | #include <iostream>
using namespace std;
int Kth(int v[], int n, int nr, int k)
{
int numara = 1, pozitie;
for (int i = 0; i < n; ++i)
{
if (v[i] == nr)
{
if (numara > k)
{
return -1;
}
if (numara == k)
{
... | ALGO | 0.999554 | 4.856641 |
66fc6fec-f2ed-4917-81de-0ff57bb27230 | Riddz04/DSA-IN-C- | Functions/countSETbits.cpp | #include<iostream>
using namespace std;
int countSetBits(int n){
int count = 0;
while(n>0){
count += n&1;
n>>=1;
}
return count;
}
int main(){
int num1,num2;
cout<<"enter first no.: "<<endl;
cin>>num1;
cout<<"enter second no.: "<<endl;
cin>>num2;
int totalSetBits ... | ALGO | 0.9998 | 5.377889 |
36acab67-b1a6-48a0-943f-3269f9f9b2a2 | JugalPatel01/CPPTutorial | 05-pattern/5-pattern08.cpp | /*
* Print reverse left Number pyramid
for value 5 :
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
*/
#include <iostream>
using namespace std;
int main()
{
int n;
cout << "enter the no. of rows : ";
cin >> n;
for (int i = n; i >= 1; i--)
{
for (int j = 1; ... | ALGO | 0.999516 | 4.235381 |
1c878f6c-f1ce-45f7-8ef9-9213baa4756d | Bonaparto/CPP-Codes | quizes/mbquiz3/v1/lcmgcd.cpp | #include <bits/stdc++.h>
using namespace std;
int gcd(int a,int b){
return b == 0?a : gcd(b, a % b);
}
int main(){
int a, b;
cin >> a >> b;
cout << (a / gcd(a, b)) * b + gcd(a,b);
} | ALGO | 0.99995 | 4.122713 |
05ec6608-509e-4e30-b931-855f88c1bf60 | Himan2104/Core | Source/Math/Utils.cpp | #include "Core/Math/Utils.hpp"
#include "Core/Definitions.hpp"
namespace Core
{
namespace Utils
{
Float32 CalculateAreaOfACircle(Float32 radius) { return Constants::Pi * radius * radius; }
} // namespace Utils
} // namespace Core
| TOOL | 0.976035 | 4.774278 |
0673d8a6-0451-431a-8e65-25b784dd48bf | irena-grigoryan/Test-Project-Flutter | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998859 | 6.785645 |
8e96a47c-ede0-4465-9d7e-555a752b16ab | HaiderAli777/NeetCode-Problem | Stack/Car-Fleet.cpp | #include <iostream>
#include <map> // Changed to map
#include <stack>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector> // Include the vector header
using namespace std;
int carFleet(int target, vector<int> &position, vector<int> &speed) {
map<int, double> m... | ALGO | 0.999342 | 5.928458 |
72f78c50-32b7-4160-8971-8a727ceee607 | zinuok/VINS-Fusion-ROS2 | vins/src/estimator/parameters.cpp | #include "parameters.h"
double INIT_DEPTH;
double MIN_PARALLAX;
double ACC_N, ACC_W;
double GYR_N, GYR_W;
std::vector<Eigen::Matrix3d> RIC;
std::vector<Eigen::Vector3d> TIC;
Eigen::Vector3d G{0.0, 0.0, 9.8};
int USE_GPU;
int USE_GPU_ACC_FLOW;
int USE_GPU_CERES;
double BIAS_ACC_THRESHOLD;
double BIAS_GYR_THRESHOLD;... | CONFIG | 0.850952 | 4.81198 |
47931e18-4227-47b6-a224-abd8dac02c14 | merrymeerkat/ShortProblems | kattis/modulo.cpp | #include <iostream>
using namespace std;
int main(){
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
// Storing user input
int numbers[10];
for (int i = 0; i < 10; i++)
cin >> numbers[i];
// Iterating over user input and counting modulo valuess
// Each possible modu... | ALGO | 0.99938 | 3.873531 |
42e30cfe-67a5-4d78-8928-a040928bd406 | ssjjitt/OAIP2sem | lab03_v02_n02/lab03_v02_n02.cpp | // 2 вариант 2 задание
// Ввести с клавиатуры строку символов, состоящую из групп цифр и нулей, и записать ее в файл. Прочитать из файла данные и вывести самую короткую группу
#include <iostream>
#include <fstream>
using namespace std;
void inFile(fstream& f, char string[]); //Функция чтения из файла
void fromFile(fstr... | ALGO | 0.976054 | 3.143611 |
7134b014-5577-460f-983a-a18b71240d12 | DoTriCong/lopD24TXCN08-B-msvB24DTCN194-Do-Tri-Cong | FPLDLF24msvB24DTCN194-06.cpp | //B24DTCN194-Do Tri Cong-Bai 6
#include <stdio.h>
float tinhDienTichXungQuanh(float l, float w, float h) {
return 2 * h * (l + w);
}
int main() {
float l, w, h;
printf("Nhap chieu dai (l) cua day: ");
scanf("%f", &l);
printf("Nhap chieu rong (w) cua day: ");
scanf("%f", &w);
printf("Nha... | ALGO | 0.982177 | 3.343292 |
53a3ce7f-805e-46a8-a3a2-34b610e81573 | al-shaimon/CP-01 | codeforces/sheet_6/U_Straight_Line.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t = 1;
// cin >> t;
while (t--)
{
int x1, y1, x2, y2, x3, y3;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
if ((y2 - y1) * (x3 - x1) == (y3 - y1) * (x2 - x1))
{
cout << "YES";
}
else
{
cout << "NO";
}
}
... | ALGO | 0.999506 | 4.336455 |
83005cfa-e884-4c62-ad51-d116d77e7397 | JAYKUMARGUPTA73/CODES | dsa c++/graphs/revised/TopoLogicalSort.cpp | #include <bits/stdc++.h>
using namespace std;
// Function to create adjacency list from edges
void createAdjList(vector<vector<int>> &edges, unordered_map<int, list<int>> &adjList) {
for (int i = 0; i < edges.size(); i++) {
int u = edges[i][0];
int v = edges[i][1];
adjList[u].push_back(v);
... | ALGO | 0.999997 | 6.914182 |
96e4d57c-2870-4612-9e96-b1a03e26003e | porterlin/CP-Practice | leetcode/binary-tree/104.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.999669 | 6.762159 |
dec57c70-40a6-44dd-a6b3-0762b939b053 | george-popoiu/infoarena_campion | infoarena_campion/taxe.cpp | #include<fstream>
#define inf "taxe.in"
#define outf "taxe.out"
#define NMax 102
#define CARD 4
using namespace std;
fstream f(inf,ios::in),g(outf,ios::out);
int mat[NMax][NMax];
int cmin[NMax][NMax];
int dl[CARD]={-1,0,1,0};
int dc[CARD]={0,1,0,-1};
int S,N;
struct coada
{
int lin;
int col;
};
coada c[NMax*NMax*NM... | ALGO | 0.99995 | 3.238631 |
541c4047-75da-48ff-b498-535a0cc811e0 | acnokego/LeetCode | 208_implement_trie/try.cpp | class Trie {
private:
unordered_set<string>hash;
public:
/** Initialize your data structure here. */
Trie() {
}
/** Inserts a word into the trie. */
void insert(string word) {
hash.insert(word);
}
/** Returns if the word is in the trie. */
bool search(strin... | ALGO | 0.999621 | 6.33011 |
27ed26c5-0f79-4749-8561-a09cb5cbb5bd | wol101/GaitSym5 | ode-0.15/ode/src/matrix.cpp | #include <ode/common.h>
#include "config.h"
#include "matrix.h"
#include "util.h"
#include "matrix_impl.h"
// misc defines
#define ALLOCA dALLOCA16
/*extern */
void dxMultiply0 (dReal *A, const dReal *B, const dReal *C, unsigned p, unsigned q, unsigned r)
{
dAASSERT (A && B && C && p>0 && q>0 && r>0);
const ... | ALGO | 0.999197 | 6.438018 |
b4fc875b-4370-449f-98a9-786e73aa4927 | henry20160826/CppWorkspace | 17. Letter Combinations of a Phone Number/src/17. Letter Combinations of a Phone Number.cpp | //Given a digit string, return all possible letter combinations that the number could represent.
//
//A mapping of digit to letters (just like on the telephone buttons) is given below.
//
//Input:Digit string "23"
//Output: ["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"].
//
//Note:
//Although the above answer i... | ALGO | 0.978664 | 5.87889 |
41fcd4ab-10d0-4d24-a76b-b679b5a956ef | ee08b397/Lintcode-7 | Cpp/Gray-Code.cpp | #include <vector>
#include <stack>
class Solution {
public:
/**
* @param n a number
* @return Gray code
*/
vector<int> grayCode(int n) {
// Write your code here
vector<int> res;
int m = 1 << n;
for (int i = 0; i < m; i ++) {
res.push_back(i ^ (i >> 1))... | ALGO | 0.99993 | 5.825295 |
ec0210b2-b377-435c-9c25-c01b87608f13 | Tomoms/android_external_libcxx | test/std/algorithms/alg.modifying.operations/alg.partitions/partition_point.pass.cpp | // <algorithm>
// template<class ForwardIterator, class Predicate>
// constpexr ForwardIterator // constexpr after C++17
// partition_point(ForwardIterator first, ForwardIterator last, Predicate pred);
#include <algorithm>
#include <cassert>
#include "test_macros.h"
#include "test_iterators.h"
struct ... | TEST | 0.979439 | 6.814747 |
139ebdac-59e5-470b-a647-5b1cab895d82 | ashishkushwaha56/LeetCode-Leethub | 0876-middle-of-the-linked-list/0876-middle-of-the-linked-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* middleNode(... | ALGO | 0.999917 | 5.82864 |
d9047d03-cf43-4e08-ad0b-b58dabab8455 | Technishq/CNlab | exp9/crcgenerator.cpp | //A. Write a C/C++ program to generate codeword at the sender using CRC method
#include <stdio.h>
#include <string.h>
#define N strlen(g)
char t[28], cs[28], g[30];
int a, e, c;
void exor() {
for (c = 1; c < N; c++)
cs[c] = ((cs[c] == g[c]) ? '0' : '1');
}
void crc() {
for (e = 0; e < N; e++)
... | ALGO | 0.999944 | 5.230926 |
0233eb94-3580-43be-b2e5-32634c73ea37 | AyanPahari/Must-Do-Coding-Questions-for-Top-Product-Based-Companies | Trees/5. Inorder(iterative).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.999984 | 6.596106 |
6b77ffdc-3e64-4197-9760-ccc4cb865e89 | singhisking123/ProgramSnippets | leetcode/sum_in_matrix_prefix_array.cpp | // to find sum in a 2-d matrix from (row1,col1) to (row2,col2);
#include<bits/stdc++.h>
using namespace std;
class NumMatrix {
public:
vector<vector<int>> mat;
vector<vector<int>>prefix;
NumMatrix(vector<vector<int>>& matrix) {
mat = matrix;
prefix = mat;
for(int i = 0;i<mat.size();i... | ALGO | 0.999785 | 5.466388 |
0a6b9a05-202a-4433-a233-7482d3c52a70 | Sunit-Shrestha/Competitive-Programming | 995/B.cpp | #include <bits/stdc++.h>
using namespace std;
#define fast_io ios::sync_with_stdio(false); cin.tie(0);
#define pb push_back
#define all(v) v.begin(), v.end()
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
const int MOD = 1e9 + 7;
void solve() {
int n, a, b, c, ans, temp;
cin >> n >> a >> b ... | ALGO | 0.999912 | 4.250424 |
6f2e1d3d-2abd-4cdb-9c5a-396056f75508 | Mitesh12ehd/DSA | 24. Sliding Window/q4_longest_repating_charcter_replacement.cpp | #include<iostream>
using namespace std;
//brute force n^2
// int characterReplacement(string s, int k) {
// int n = s.length();
// int maxlen = 0;
// for(int i=0; i<n; i++){
// int hash[26] = {0};
// int maxfreq = 0;
// for(int j=i; j<n; j++){
// hash[s[j] - 'A']++;
//... | ALGO | 0.999964 | 6.154261 |
2942919c-fb8e-487a-a0e0-d658e068a741 | fordsaranpong/Lab-14 | lab14_3.cpp | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int a[] = {1,2,4,6,9};
double b[] = {5.5,2.1,13,-7,6.9,0,25,11.1,-4};
int *pa=max_element(a,a+5);
cout << "Address of the highest value in array A is " << &pa << "\n";
cout << "The highest value in array A is "<< *pa << "\n";
double *pb... | ALGO | 0.998009 | 4.045511 |
a4d76fef-3542-468c-91ca-cbfe8eb6a49d | Vladimir210690/homework | Zmey.cpp | #include <iostream>
#include <conio.h>
#include <ctime>
using namespace std;
const int ROW = 20;
const int COL = 40;
int x = ROW / 2;
int y = COL / 2;
int check = 0;
bool gameOver = false;
enum po {STOP = 0, LEFT, RIGHT, UP, DOUN};
po run;
int xfr = rand() % ROW;
int yfr = rand() % COL;
void Draw1()
{
system("cl... | ALGO | 0.985745 | 3.004883 |
b080e7fb-50de-4dc2-ba75-663faa49eac9 | keqhe/leetcode | round2/leetcode47.cpp |
class Solution {
public:
//compared with permutation problem, need to consider how to avoid duplicates
//see ref: http://bangbingsyb.blogspot.com/2014/11/leetcode-permutations-i-ii.html
void backtracking(vector<int> & nums, vector<bool> & used, vector<int> &path, vector<vector<int>> & res) {
if (pa... | ALGO | 0.999941 | 5.917737 |
a7ec08fa-cdb0-4f6e-b07a-01960b970451 | pengowray/MSHV | src/HvDecoderMs/decoderq65.cpp | #include "decoderq65.h"
//#include "../HvMsPlayer/libsound/gen_pulse_gfsk.h"
//#include "ft_all_ap_def.h"
//#include <unistd.h>
#define NSTEP 8
#define NMAX (120*12000) // !Max TRperiod is 300 s
#define PLOG_MIN -242.0 //!List decoding threshold
static const int isync[86] =
{
1,9,12,13,... | TOOL | 0.879622 | 3.847421 |
b77ad195-6284-42d8-ab2e-9d2bd5f3349d | xuau34/competitive-programming | PCCA2017s/Day12/pD.cpp | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
cin >> n;
for (int i=0; i<n; ++i) {
long double d, a;
cin >> d >> a;
// if is square
long double l = d / sqrtl(2.0L);
long double r = d / 2.0L;
if (abs(a-l*l)<1e-5... | ALGO | 0.997317 | 3.548224 |
d48d8f70-ef10-4d27-91a2-544d68729f95 | murphyliu73/GPUParallel_CUDA | Chapter2/src/ImageFlip_CPUParallel.cpp | #include <iostream>
#include <thread>
#include <chrono>
#include <thread>
#include "CPUTimer.h"
#include "ImageStuff.h"
#define REPS 129
template <typename T>
void FlipHRawImageFunc_Parallel(const T* inputImage, T* outputImage, const int width, const int height, int start, int end) {
// 确保输入有效
if (inputImage == nu... | ALGO | 0.949134 | 5.313526 |
1467c68a-24bf-450e-9e6c-f74fc624e5bb | ManavJoshi111/Coding_Solutions | Left View of Binary Tree - GFG/left-view-of-binary-tree.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// Tree Node
struct Node
{
int data;
Node* left;
Node* right;
};
vector<int> leftView(struct Node *root);
// Utility function to create a new Tree Node
Node* newNode(int val)
{
Node* temp = new Node;
temp->data = val;
temp->... | ALGO | 0.999543 | 6.948297 |
1c96f60f-1396-42b5-bf24-91d51913c74e | sdnuwyx/OPP_WORK | 第四章实验作业/4.3 程序实例/example4_06.cpp | <<<<<<< HEAD
#include<iostream>
using namespace std;
#include "example4_06_student.h"
#include<stdlib.h>
const int N=10;
void menu();
void OutputStu( Student *array);//ָʽǰconst
void InputStu(Student *array);
int SearchStu( Student *array, char *na);//ָʽǰconst
bool InsertStu(Student *array);
bool DeleteStu(Student *arr... | TOOL | 0.874998 | 3.080188 |
cb266181-5c2f-454a-9dc3-4e335d1ed6b3 | jnobre/google-code-jam-2018 | round2/graceful-chainsaw-jugglers.cpp | #include <algorithm>
#include <cstdio>
#include <cstring>
#define MAXRB 500
#define MAXSZ 45 // solve MAXRB * 2 = MAXSZ + (MAXSZ + 1) / 2
using namespace std;
int dp[MAXRB + 1][MAXRB + 1];
int main() {
int t;
scanf("%d\n", &t);
for(int tc = 1 ; tc <= t ; tc++) {
int r, b;
scanf("%d %d\n",&r, &b);
memset... | ALGO | 0.999655 | 4.21948 |
d086609a-e950-4b90-8e37-d3f3be83a6fe | krish-1504/DSA_90DAY-S | Day30_BT/64.MaxSum.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.999939 | 6.238924 |
771b3f95-7490-4fe8-bc4c-d0cebfc11ddc | zmx4/MySteps | PTA/数据结构/6-9 在带头结点的单链表表尾处插入一个新元素.cpp | #include <stdio.h>
#include <stdlib.h>
typedef int ElemType;
typedef struct LNode
{
ElemType data;
struct LNode *next;
} LNode, *LinkList;
LinkList Create();
void print(LinkList L);
void insert(LinkList L, ElemType e);
int main()
{
int e;
LinkList L = Create();
print(L);
printf("\n");
scanf("%d", &e);
insert(L... | ALGO | 0.999453 | 3.669118 |
575bc20e-9b0e-4213-a6fb-38a9c17bff3b | God-father1/C-CC- | ccCIELAB.cpp | #include <iostream>
using namespace std;
int main() {
long int a,b;
cin>>a>>b;
if((a-b)%10==9){
cout<<a-b-1;
}
else{
cout<<abs(a-b+1);
}
return 0;
}
| ALGO | 0.999773 | 3.547379 |
b34608dd-8f15-456e-8b55-1ae6dc45afe6 | pccq2002/windbg | windbg/localwin.cpp | /*
* Preprocessor
*/
#include "precomp.h"
#pragma hdrstop
BOOL AcceptValueUpdate(PTRVIT pVit,PPANE p);
/*
* Global Memory (PROGRAM)
*/
extern CXF CxfIp; // The Current IP Context
extern LPSHF Lpshf; // Pointer to SH function vector
/*
* Global Memory (FILE)
*/
HWND hWndLocal;
PTRVIT pvitLocal;
/*
... | TOOL | 0.917823 | 5.153702 |
1b75098b-6e12-412c-abfa-4eb368d3edc8 | acidentally/cplusplus | AdventofCode/2024/2.cpp | /*
Good luck for those who are trying your best
May the most glorious victory come
File name: 2.cpp
Code by : acident / lckintrovert
Created since : 02/12/2024 ~~ 09:21:37
Literally the worst cp-er ever
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define uint ... | ALGO | 0.998547 | 4.715369 |
71996b7b-f313-41f5-b3d6-ede0e17c7b7c | Rudedaisy/PIMSim | GEM5Simulation/gem5/src/systemc/tests/systemc/misc/user_guide/chpt5.1/accumulator.cpp | /*****************************************************************************
accumulator.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/************************************************************************... | ALGO | 0.987962 | 5.740953 |
5c03c718-63b4-4ce4-8757-e869e4585cef | arnab9997/DSA-Problems-Personal | Codeforces/Div 2/CF 561 (Div 2)/B. All the Vowels Please (IMP - strings).cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
//#define REP(i, a, n) for(int i=a; i<n; ++i)
#define REP(i, st, en) for(__typeof(en) i=(st)-(st>en); i!=(en)-(st>en); i+=1-2*(st>en))
#define pb push_back
#define sz(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
typedef ... | ALGO | 0.999859 | 4.555514 |
9a40a1f8-5ec5-40eb-84b5-19a8bc389f41 | CitrusPeel/dng_sdk | dng_sdk/source/dng_matrix.cpp | /*****************************************************************************/
/*****************************************************************************/
#include "dng_matrix.h"
#include "dng_assertions.h"
#include "dng_exceptions.h"
#include "dng_utils.h"
/*****************************************************... | TOOL | 0.976225 | 7.249016 |
96aa3caf-dc24-4a1d-8740-832a0e438a15 | RosaDamascena/Algorithm_cpp | BOJ/2470_TwoSolutions/main.cpp | // 2470 - 두 용액
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
vector<long long> arr(N);
for (int i = 0; i < N; i++){
cin >> arr[i];
}
sort(arr.... | ALGO | 0.999995 | 4.724803 |
43fd06e1-798a-4f0c-817a-c64da47628a4 | tymofiiivzhenko/laba15-5 | laba15-5/laba15-5.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int main() {
int i, N;
printf("Enter the size of the massif: ");
scanf("%d", &N);
int* A = (int*)malloc(N * sizeof(int));
printf("Enter the elements of the massif:\n");
for (i = 0; i < N; ++i) {
printf("Element %d... | ALGO | 0.987746 | 4.126426 |
81c5b9fb-95e0-4528-9498-671d5af14c7e | Dongliiy/slam2_code | ch4/example/trajectoryError.cpp | #include <iostream>
#include <fstream>
#include <unistd.h>
#include <pangolin/pangolin.h>
#include <sophus/se3.hpp>
using namespace Sophus;
using namespace std;
string groundtruth_file = "./example/groundtruth.txt";
string estimated_file = "./example/estimated.txt";
typedef vector<Sophus::SE3d, Eigen::aligned_alloca... | ALGO | 0.929206 | 4.989697 |
4bc3b808-b771-4175-a7cd-05b0f1d84f89 | masken64/100Days | min Operations.cpp | class Solution {
public:
int minOperations(vector<int>& v, int k) {
int n=v.size();
int ans=0;
for(int i=0;i<=30;i++) {
int b=0;
for(int j=0;j<n;j++) {
if(((v[j]>>i)&1)==1)
b=b^1;
}
if(((k>>i)&1)!=b)
... | ALGO | 0.999943 | 5.675282 |
0f0fce93-adb9-4e89-b206-8e2684d47736 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_7990_3.cpp | #include <bits/stdc++.h>
using namespace std;
const long long int inf = 2e18;
long long int solve() {
long long int a, n, m;
cin >> a >> n >> m;
vector<long long int> col(a + 1, 0);
vector<pair<long long int, long long int>> p;
for (long long int j = 1; j <= n; j++) {
long long int l, r;
cin >> l >> r... | ALGO | 0.999952 | 4.042446 |
8b52b30f-1f29-4ecb-b4df-34e52383871b | DhirajGadekar/Cpp_programming | Operator Overloading/22_RelationalOperatorOverload.cpp | #include<iostream>
class Demo {
int x;
public:
Demo(int x) {
this->x = x;
}
int operator==(const Demo& obj) {
return (this->x == obj.x);
}
};
int main() {
Demo obj1(20);
Demo obj2(30);
std::cout << (obj1 == obj2) << std::endl;
return 0;
}
| ALGO | 0.968516 | 4.71142 |
206bc47f-288f-4096-b102-2dd29862a7d0 | vrees/ttgo | ttgo-esp32-node/lib/arduino-lmic-master/src/aes/ideetron/AES-128_V10.cpp | /******************************************************************************************
*
* File: AES-128_V10.cpp
* Author: Gerben den Hartog
* Compagny: Ideetron B.V.
* Website: http://www.ideetron.nl/LoRa
* E-mail: <EMAIL>
*******************************************************************... | ALGO | 0.992786 | 6.295757 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.