uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
a5d30f82-60d0-4eda-9888-5c25832313db
Rhithick02/C-code
Misc/Codeforces/1349A.cpp
#include<bits/stdc++.h> using namespace std; #define lli long long #define For(i,a,n) for(int i=(a);i<n;i++) #define vi vector<int> #define vil vector<long long> #define asc(x) x.begin(),x.end() #define des(x) x.rbegin(),x.rend() #define pb push_back #define pa pair<int,int> #define pal pair<long long,long long> #defin...
ALGO
0.999993
4.352406
8d32ab8b-1ec7-46b4-8f7a-3789f4fd4282
BerkeEfeKendirli/news_app
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
c3d5469f-ea49-4287-b570-2a06ab245683
sudeepjoelbayyee/SMS-Spam-Classifier
ssc/Lib/site-packages/sklearn/utils/src/MurmurHash3.cpp
// Note - The x86 and x64 versions do _not_ produce the same results, as the // algorithms are optimized for their respective platforms. You can still // compile and run any of them on any platform, but your performance with the // non-native version will be less than optimal. #include "MurmurHash3.h" //-------------...
ALGO
0.998523
7.198757
d7cbc32d-5a93-4e1f-8436-cb17a7c21747
ishit1011/Everyday-LeetCode
1530-number-of-good-leaf-nodes-pairs/1530-number-of-good-leaf-nodes-pairs.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.999992
6.248706
34292989-e0ce-498a-b147-b452dd3f11ad
gabrielvelosoucb/facudade-eng-softwer
atividades avaliativas/lista 1/questao7.cpp
#include <iostream> int main(){ int const tam=10; int vetor[tam]; int maior; int pos; printf("preencha o vetro com 10 valores"); for(int i=0;i<tam;i++){ scanf("%d", &vetor[i]); } maior=vetor[0]; printf("vetor;\n"); for (int i = 1; i < tam; i++) { printf("%d, ...
ALGO
0.997501
3.563488
fa388b63-3b26-470b-b078-d916c3535910
tangyao0792/ACM_Solutions
UvaOj/uva674.cpp
#include<cstdio> #include<cstring> int d[5][7500]; int c[5]={1,5,10,25,50}; int main() { #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); #endif memset(d,0,sizeof(d)); d[0][0]=1; for(int i=0;i<5;i++) for(int v=0;v<=7489;v++) { if(v>=c[i]) d[i][v]+=d[i][v...
ALGO
0.999464
3.405221
b01482b5-e837-4ad7-85ac-9b839317d614
i-Nur23/SAOD_2_4_3
SAOD_2_4_3_/SAOD_2_4_3_.cpp
#include <iostream> #include <string> #include <set> #include <locale> #define _CRTDBG_MAP_ALLOC #include <crtdbg.h> #define DBG_NEW new( _NORMAL_BLOCK , __FILE__ , __LINE__ ) #define newDBG_NEW using namespace std; const int m = 5; int count = 0; struct HashCell { HashCell* next; string key; }; struct Has...
ALGO
0.993275
4.563503
ac3aef61-04f7-4231-b158-620a82edd25a
shres58tha/ioe_study_codes-C-_COA_CG_etc
CPP/classwork/overloaded_function.cpp
/* wap to find area of circle , rectangle and square using function overloading*/ #include <iostream> #define PI 3.14 using namespace std; double area ( double r){ // circle double arg return PI*r*r; } float area ( float s){ // square float arg return s*s ; } float area ( float l, float b){ // rectan...
TOOL
0.871558
4.352101
6d2e7bcf-e2e6-4522-af1a-241f48bf5de4
SAURABH200301/MyCppCodes
patternn.cpp
#include<bits/stdc++.h> using namespace std; //time complexity O(n^2) int main(){ int n; cin>>n; int num=10; for(int i =0;i<n;i++){ for(int j=0;j<=i;j++){ cout<<num<<" "; num++; } num++; cout<<endl; } return 0; }
ALGO
0.99994
3.777317
d668ea84-df00-4977-9c07-5b1f0f086f4c
ishandutta2007/codeforces
hehere/normal/1016/B.cpp
#include <cstdio> #include <cstring> #include <cctype> #include <cassert> #include <iostream> using std::cin; using std::cout; using std::endl; #include <algorithm> using std::sort; using std::min; using std::max; #include <vector> using std::vector; #include <set> using std::set; #include <queue> using std::queue; usi...
ALGO
0.999905
3.630863
1a95df1e-9aa7-4f25-875f-2fbe59052712
asutosh04/OOP-in-CPP
Lab Assignment/LAB 11_16-11-22/Q3.cpp
/*WAP to find sort an integer array and a float array, using class template..*/ #include<iostream> using namespace std; template<typename T> class Sort { T a[5]; public: Sort() { cout<<"Enter 5 elements: "; for(int i=0; i<5; i++) cin>>a[i]; } void sort() { ...
ALGO
0.997866
4.56541
80a9eba0-60e7-4e78-afbc-02d7ed59d83f
Anishprajapat123/DATA-STRUCTURES-AND-ALGOS
ARRAY/MOVING ZERO AT THE LAST.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; void movingzeroatend(vector<int> &arr,int n) { int temp[n]={0}; int j=0; int count=0; for(int i=0;i<n;i++) { if(arr[i]!=0) { temp[j]=arr[i]; j++; } else { count++; ...
ALGO
0.999952
3.972378
9284e727-d962-4ac5-b3e4-0f02d83f8bc1
ishandutta2007/codeforces
bilyhurington/normal/1684/C.cpp
#include<bits/stdc++.h> using namespace std; int T,n,m,a[200010],b[200010]; #define id(x,y) (m*(x-1)+y) void solve(){ scanf("%d %d",&n,&m); for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ scanf("%d",&a[id(i,j)]); b[id(i,j)]=a[id(i,j)]; } } vector<int> vec; for(i...
ALGO
0.999922
3.042729
8f035174-c485-40e3-8f0e-0353040b596d
gitter-badger/DeathCore
src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
/* ScriptData SDName: Boss_Magtheridon SD%Complete: 60 SDComment: In Development SDCategory: Hellfire Citadel, Magtheridon's lair EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "magtheridons_lair.h" #include "Player.h" #include "SpellInfo.h" enum Yells { SAY_TAUNT ...
TOOL
0.891522
6.584077
a7859a0c-873f-4ab7-9038-c45166ddd331
pratham27037/c-program
c++program/recursion/nestedrecursion.cpp
#include<iostream> using namespace std; int fun(int n){ if(n>100) return n-10; return fun(fun(n+11)); } int main(){ int r; r = fun(95); cout<<r; return 0; }
ALGO
0.999753
3.076596
397bd482-5d23-444c-b2ed-9c2c2d056ded
Singledevo/c_AND_cpp
countingsetBit.cpp
#include<iostream> using namespace std; class counting{ public: void setbit(int a, int b) { int mask=0; int setbitA= a | mask; int setbitB = b|mask; for (int i = setbitA - 1; i >= 0; --i) { cout << ((a >> i) & 1); ...
ALGO
0.999358
3.300363
eec27bcd-edf0-401d-9dc1-0084da4f7d53
cyrilggg/ACM
problem/Daily/2022/9/4/D.cpp
#include <bits/stdc++.h> using namespace std; //ڱȽϳ "YES""NO"Ŀ #define returnNo return void(puts("No")) #define returnYes return void(puts("Yes")) // // debug,ֻڱر༭ʾ template <typename A, typename B> ostream &operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; } templ...
ALGO
0.999947
4.617717
7cf42037-8723-44f4-89bf-78af0b4e081c
BalajiKhavane/DSA
Q1_Maximum Median Sum of Subsequences of Size 3©leetcode.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; long long maximumMedianSum(vector<int>& nums) { sort(nums.begin(), nums.end()); int st = 0, end = nums.size() - 1; long long sum = 0; while (st < end) { sum += nums[end - 1]; // Picking the middle element of the tri...
ALGO
0.999998
5.957031
f3101567-19fa-4da1-ba46-0e7863dc12d0
talDoFlemis/bentomark
controllers/Newton.cpp
#include "Newton.h" Newton::Newton(){} void Newton::setFirstStep(double step) { this->firstStep = step; } void Newton::updateNextStep() { this->nextStep = this->firstStep - (this->function->getValue(this->firstStep)) / (this->function->getDerivativeValue(this->firstStep)); } void Newton::updateValues() { ...
ALGO
0.999917
3.964717
6e9a98f1-ea92-48b6-8181-1fb3a41d289b
stretchxray/Path_Planning
src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Eigen::MatrixXf m(2,4); Eigen::VectorXf v(2); m << 1, 23, 6, 9, 3, 11, 7, 2; v << 2, 3; MatrixXf::Index index; // find nearest neighbour (m.colwise() - v).colwise().squaredNorm()...
ALGO
0.999888
4.152517
0e647219-45a7-4211-bc9a-3626c81e3c94
phuongok2112003/nam_one
nghicchoi/baicuatam.cpp
#include <iostream> using namespace std; class Diem{ private: int n,t,y; public: void nhap(); void xuat(); }; class hs{ private: char ten[30]; int tuoi; float diem; Diem ds; public: void nhap(); void xuat(); friend class Diem; void friend xs(hs *a,int n); }; void Diem::nhap(){ cout<<"Nhap ngay: ";cin>>n; co...
ALGO
0.99469
3.53477
1fe46424-6c74-4ff2-90b8-8f8bbdb5b3ff
krishna-raj007/BodhiTree-Annotation
CS101_Spring2020-21 /LAB4_L2/categorized/pi/all_passed/57_pi.cpp
#include<simplecpp> main_program{ int n,a{1}; double answer{1}; cin>> n; repeat(n){ if(a % 2 ==0){ answer += 1.0/((2*a)+1); } else{ answer -= 1.0/((2*a)+1); } a++; } answer *= 4; cout<< answer; }
ALGO
0.9988
3.45724
9b826fa6-dddf-4d3e-8786-694392717345
xjtuwxg/llvm-ptr-hide
lib/CodeGen/EdgeBundles.cpp
#include "llvm/CodeGen/EdgeBundles.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/Passes.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/GraphWriter.h" using namespace llvm; static cl::opt<bool> ViewEdgeBundles("view-edge-bundles", cl::H...
TOOL
0.893326
7.550409
5202c248-79cd-46f1-b45f-3f1cf5007970
tcz717/leetcode
35-cpp-search-insert-position/solution.cpp
#include <vector> #include <iostream> #include <sstream> #include <algorithm> using namespace std; // BEGIN UPLOAD ZONE class Solution { public: int searchInsert(vector<int> &nums, int target) { return distance(nums.begin(), lower_bound(nums.begin(), nums.end(), target)); } }; // END UPLOAD ZONE
ALGO
0.999933
6.110991
8a1cd2ba-d936-475d-92db-2947dc02b3c0
prabhatku304/cpp
B117014.cpp
#include<iostream> using namespace std; class cases{ public: unsigned int caseid; char activity; public: void get(){ cout << "enter case id" <<endl; cin >> caseid; cout << "enter activity" <<endl; cin >> activity; } }; int ma...
ALGO
0.999358
3.63193
45026ae9-eaf8-4d71-8663-af732954d845
ishandutta2007/codeforces
yousef_salama/normal/91/A.cpp
#include <iostream> #include <vector> #include <string> #include <stack> #include <algorithm> #include <bitset> #include <math.h> #include <queue> #include <map> #include <set> #include <limits.h> #include <limits> #include <stdio.h> #include <stdlib.h> #include <cstring> #include <sstream> using namespace std; int mai...
ALGO
0.999968
3.84302
860f7d43-e480-4f82-8ec2-fff7ecaf7615
naxocist/POSN-IPST
codeforces/1875D.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; void f() { ll n; cin >> n; ll mex = 0, mn = LLONG_MAX; unordered_map<ll, ll> cnt; vector<ll> v(n); for(auto &x : v) cin >> x; sort(v.begin(), v.end()); for(auto x : v) mex += (x == mex), cnt[x] ++, mn = min(mn, x); ll res = LLONG_MAX, rm = 0; ...
ALGO
0.999876
4.136958
d7f00912-34e9-4d3c-993c-e4a0d8eb8b05
seandewar/challenge-solutions
leetcode/easy/happy-number.cpp
// https://leetcode.com/problems/happy-number/ // // Using hash set. // Complexity: runtime O(logn), space O(logn). class Solution { public: bool isHappy(int n) const { unordered_set<int> seen; while (n != 1) { if (seen.count(n) > 0) return false; // endless loop if...
ALGO
0.999685
6.935959
53f1c791-a62e-4697-844a-78c4d67d9820
ahmad-alrifai/Shooter-Game
Library/PackageCache/com.unity.ide.visualstudio@2.0.14/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp
#include <iostream> #include <sstream> #include <string> #include <filesystem> #include <windows.h> #include <shlwapi.h> #include "BStrHolder.h" #include "ComPtr.h" #include "dte80a.tlh" constexpr int RETRY_INTERVAL_MS = 150; constexpr int TIMEOUT_MS = 10000; // Often a DTE call made to Visual Studio can fail after ...
TOOL
0.949674
6.969462
043d441d-244a-4fbe-aaa2-5e331b4f1811
td0g/cnc_mini_mill
td0g_cnc_mini_mill/d0gStep.cpp
#include "d0gStep.h" #include <Arduino.h> //#define TEST_SPEED #define NONATOMIC_IS_UNSAFE TCNT2>0xf8 //Timer rollover at 0xFF #define CLOCK_PRESCALER 0b00000010 /// 001 = /1, 010 = /8, 011 = /32, 100 = /64, 101 = /128, 110 = /256, 111 = /1024 d0gStep::d0gStep(uint8_t _maxMotors, uint8_t _disableTime, uint8_t _en,...
TOOL
0.933751
5.812443
9de2ae0d-5931-41c2-bd16-765470142d3f
jgh05168/AlgorithmStudy
프로그래머스/3/118669. 등산코스 정하기/등산코스 정하기.cpp
/* n개의 정점, 양방향 그래프 쉼터 혹은 산봉우리를 방문할 때마다 휴식 가능 휴식 없이 이동해야 하는 시간 중 가장 긴 시간 : intensity 출입구 중 한 곳에서 출발하여 산봉우리 중 한 곳만 방문한 뒤 원래의 출입구로 돌아오는 등산코스 출입구는 무조건 한 곳만 방문해야함(중간에 방문 금지) 풀이 : 다익스트라 가는 부분만 체크하면 됨 : 이미 도착지까지 경로는 최소 경로임. 돌아오는데 그거보다 더 커지는 쪽으로 갈 필요 없음 */ #include <string> #include <vector> #include <iostream> #include <a...
ALGO
0.999073
4.995178
e26d8d7b-1e57-4b68-8052-8497a657f60b
mainul3195/codes
camp - october 2024/day - 5 (string)/D_D.cpp
#include <bits/stdc++.h> using namespace std; #define mod 1000000007 string s; vector<long long> isp; void pre() { isp = vector<long long>(s.size(), -1); long long l = -1, r = 1; while (r < s.size()) { if (s[l + 1] == s[r]) isp[r++] = ++l; else { if (!l) ...
ALGO
0.999956
5.620306
ebe3005f-6f76-4d5e-8c74-9ce8e20e08d8
usamailyas007/bloc_practice
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.998799
6.776823
bf167317-c9e0-465b-a66e-1c9335389e5c
msalvato/pcl_kinfu_highres
doc/tutorials/content/sources/greedy_projection/greedy_projection.cpp
#include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #include <pcl/kdtree/kdtree_flann.h> #include <pcl/features/normal_3d.h> #include <pcl/surface/gp3.h> int main (int argc, char** argv) { // Load input file into a PointCloud<T> with an appropriate type pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::Point...
TOOL
0.941179
6.064307
cf71deee-8014-424b-9277-da8d38a768da
DivyanshBytes/100-Days-LeetCode-Challenge
Day 60/RangeSumofBST.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.999986
6.562198
071987ef-98ba-4da0-9b0d-8e87c6b661f8
AlligatorTHPhat/Code_Practice
Basic_Knowledge/Graph Theory/ Theory /DanhSachKe -->DanhSachCanh.cpp
//Danh Sach Ke --> Danh Sach Canh #include <iostream> #include <vector> #include <string> #include <sstream> using namespace std; int n; vector<int> adj[1001]; vector<pair<int, int>> edge; int values[1001][1001]; int main() { //Nhap kich thuoc Ma Tran cin >> n; cin.ignore(); //Nhap Danh Sach Ke for (int i = 1...
ALGO
0.9997
3.812968
6e71ba30-477d-42f2-a88e-0640c892cfb6
nian0122/CODE
code/learn/C++learn luogu/【入门1】顺序结构/P5704.cpp
#include<iostream> using namespace std; int main(){ char a,b; cin>>a; b=toupper(a); cout<<b<<endl; return 0; }
ALGO
0.931579
3.730349
1599fb90-91db-4c62-9c2b-c0af56ebb558
HimanshT/cc-codes
sandq/296.cpp
// implement stack from scratch #include<bits/stdc++.h> using namespace std; struct node{ struct node* next; struct node* pre; int data; }; struct node *mid=NULL; int n=0; struct node *push(struct node *top,int value) { struct node *ptr=(struct node*)malloc(sizeof(struct node)); ptr->data=value; if(top==NULL...
ALGO
0.999526
4.017303
e278392e-c08a-4dda-90e3-8a17bb441b89
YoungDevelopers3/Competitive-Programming
66-plus-one/plus-one.cpp
class Solution { public: vector<int> plusOne(vector<int>& digits) { int carry=1; int n=digits.size(); for(int i=n-1;i>=0;i--){ int sum=digits[i]+carry; digits[i]=sum%10; carry=sum/10; } if(carry){ digits.insert(digits.begin(),car...
ALGO
0.99983
6.405767
66477348-c1bb-4b96-aa9a-b9384ae36f22
molloy-lab/Dollo-CDP
src/boost_1_80_0/libs/compute/example/opencv_sobel_filter.cpp
//---------------------------------------------------------------------------// // About Sobel Filter: // * Edge Filter - distinguishes the differrent color region // * Finds the gradient in x and y-axes // * Three step process // -> Find x-axis gradient with kernel/matrix // Gx = [-1 0 +1] // ...
ALGO
0.997698
6.980258
c7ab8b8e-e08a-408c-9669-6016cba5c35f
IzonaLy/cpp_programs
059. Swap The Elements of The Vector.cpp
//Swap The Elements of The Vector #include<iostream> #include<vector> using namespace std; int main(){ vector<int> vect1={1,2,3,4,5}; vector<int> vect2={11,12,13,14,15}; int temp; for (int i=0;i<vect1.size();i++){ temp=vect1[i]; vect1[i]=vect2[i]; vect2[i]=temp; } cout<<"VEct 1 is"<<endl; for(...
ALGO
0.998499
4.21581
61a4a1b6-e0ed-44fa-80a8-97608a5380ba
rammiah/OnlineJudge
nowcoder/acm_contest_85_a.cpp
#define _USE_MATH_DEFINES #include <cstdio> #include <unordered_map> #include <unordered_set> #include <vector> #include <string> #include <cstring> #include <cctype> #include <cmath> using ull = unsigned long long; using ll = long long; using uint = unsigned int; int main() { // 获取自然底数e的值 const double e = M_...
ALGO
0.997339
3.465863
bca04d20-6907-47e8-8154-4e6493e9f552
Nirbhay-Gupta/Top-notch-DSA-Problem
Matrices/Rotate_matrix_by_90 degree in anticlockwise/main.cpp
#include <iostream> using namespace std; void antiRotate(int *arr[],int m,int n){ for(int i=m-1;i>=0;i--){ cout<<"\n"; for(int j=0;j<n;j++){ cout<<arr[j][i]<<" "; } } } int main() { int m,n; cin>>m>>n; int *arr[m]; for(int i=0;i<m;i++){ arr[i]=new ...
ALGO
0.999389
3.508259
738d1115-0b90-4c8c-bbfa-d3d1ae484b9d
9gix/cg
cs4247/assg2/Triangle.cpp
#include <cmath> #include "Triangle.h" using namespace std; bool Triangle::hit( const Ray &r, double tmin, double tmax, SurfaceHitRecord &rec ) const { Vector3d e1 = v1 - v0; Vector3d e2 = v2 - v0; Vector3d p = cross( r.direction(), e2 ); double a = dot( e1, p ); //if ( a == 0.0 ) return false; doub...
ALGO
0.965098
6.356707
08a9856f-7ed3-4823-bb0b-aae7e6e04c96
shahab8757/Recursion-topics-question-DSA-
print 1 to n.cpp
#include<iostream> using namespace std; int count(int n) { //base condition if(n==0) { return; } //recursive function count(n-1); cout<<n <<endl; } int main() { system("cls"); int n; cin>>n; count(n); }
ALGO
0.999654
4.182122
f0ec2655-fd0e-4f60-aa30-71c9b3046f05
weenchvd/Programming_Principles_And_Practice_Using_CXX
Chapter_23/C23_Exercise_23.14.cpp
/* Exercise 23.14 */ #include<iostream> #include<istream> #include<fstream> #include<sstream> #include<iomanip> #include<string> #include<vector> #include<regex> #include"C23_Exercise_23.14.h" using namespace std; inline void error(string s) { throw runtime_error(s); } inline void error(const string& s, const string...
TOOL
0.931275
6.223817
5ad9367a-2e7c-4028-900d-ba3faa38e782
raj607-dev/Repository-8
Min.cpp
class Solution { public: int minOperations(int n) { // median := median of arr // diffs[i] := median - arr[i] where i <= i <= n / 2 // ans := sum(diffs) // e.g. // n = 5, arr = [1, 3, 5, 7, 9], diffs = [4, 2] // ans = (4 + 2) * 2 / 2 = 6 // n = 6, arr = [1, 3, 5, 7, 9,...
ALGO
0.99961
6.482544
cb99694d-7409-47bc-8e86-6005b0ca587e
czg12300/MambaProject
Mamba/framework/src/main/cpp/effect/common/Matrixs.cpp
// // Created by yongfali on 2016/4/21. // // NxN Matrix Math classes // // The elements of the matrix are stored as column major order. // | 0 2 | | 0 3 6 | | 0 4 8 12 | // | 1 3 | | 1 4 7 | | 1 5 9 13 | // | 2 5 8 | | 2 6 10 14 | // | 3 7 11 15 | ///////////...
ALGO
0.998119
7.343577
b2b8d3a7-1d60-4736-92be-2544c25c7cc7
IsratJahan09/Codeforces-problem
C. Joyboard.cpp
/*........Hard work and consistency is the only way to success........ */ #include<bits/stdc++.h> using namespace std; #define ll long long const int N=1005; //int d[N][N],pref[N][N]; int main() { // clock_t st= clock(); ios_base::sync_with_stdio(false); cin.tie(NULL); int t;cin>>t; while(t--){ ...
ALGO
0.999895
3.61208
4feef120-3df5-447b-8225-bc37660913c5
Dheeraj464/Advance-coding2
DFSwithRecursion.cpp
#include<iostream> using namespace std; vector<int>adj[10001]; void dfs(int currentNode, vector<bool> &visited) { visited[currentNode] = true; cout<<currentNode<<" "; for(int i = 0;i<adj[currentNode].size();i++) { if(!visited[adj[currentNode][i]]) dfs(adj[currentNode][i], visited); ...
ALGO
0.999989
4.516077
c764eaac-b746-412a-8831-c2e0fae90cd3
KhaiLe190904/Toanroirac
ERP/Vd1.cpp
#include<iostream> using namespace std; int main(){ int Sotien, soluonghanghoa; int quan=50, ao=80, dep=20, giay=90, laptop=1000; cin >> Sotien; cin >> soluonghanghoa; int Sotientieu = soluonghanghoa*(quan + ao + dep + giay + laptop); if(Sotien < Sotientieu){ printf("0"); } else{...
ALGO
0.997748
3.039511
3043cc78-a2f2-4615-b414-22b1cc806695
jiya-solanki22/DSA-Practice-Questions
maxSubArraySum.cpp
#include <iostream> #include<bits/stdc++.h> using namespace std; int maxSubArray(int a[],int n) { int curr=0,max_till_now=0; for(int i=0;i<n;i++) { curr+=a[i]; if(max_till_now<curr) { max_till_now=curr; } if(curr<0) curr=0; } return max_till_now; } int main() { int a[]={-2,1,-3,4,-1,2,1,-5,4}; int...
ALGO
0.999956
4.362952
76f49d50-e8d9-4074-b6eb-8c9ce965b4d2
ahmedsaed/MUST-CS
CS101/week 11/Sheet 8/question6.cpp
#include <iostream> using namespace std; int main() { double alpha[50]; for (int i = 0; i < 25; i++) { alpha[i] = i * i; } for (int i = 25; i < 50; i++) { alpha[i] = 3 * i; } for (int i = 0; i < 50; i++) { if (i % 10 == 0) cout << endl; ...
ALGO
0.997461
3.098618
32293475-99ea-4297-9ded-f99075c6b4e2
70X/Skeleton
viewer/igl/unique_edge_map.cpp
#include "unique_edge_map.h" #include "all_edges.h" #include "unique_simplices.h" #include <cassert> #include <algorithm> template < typename DerivedF, typename DerivedE, typename DeriveduE, typename DerivedEMAP, typename uE2EType> IGL_INLINE void igl::unique_edge_map( const Eigen::PlainObjectBase<DerivedF>...
ALGO
0.981741
6.148343
dc219c18-14e3-4e77-b570-f109b720e815
ntkay/2023aaib2
week03/week03-6.cpp
#include <stdio.h> int main(){ int a; scanf("%d", &a); int ans = 1; for (int i=1; i<=a; i++){ ans *= i; } printf("%d", ans ); }
ALGO
0.999921
4.366888
534c4749-7588-456a-87ec-72b0f89ec06d
bonaventura4646/tugas-alpro
3/main.cpp
#include <iostream> using namespace std; void hitungTotal(int arr[], int n) { int total = 0; for(int i = 0; i < n; i++) { total += arr[i]; } cout << "Total jumlah array adalah: " << total << endl; } int main() { int arr[4]; for(int i = 0; i < 4; i++) { cout << "Masukkan angka ke-" <<...
ALGO
0.972105
4.764413
8ee2aecb-f98a-4db5-9866-ec80c06a938d
raincross7/code-similarity
codes/train_code/problem115/problem115_29.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int S,W; cin>>S>>W; 1<=S<=100; 1<=W<=100; if(S<=W){ cout<<"unsafe"<<endl; }else{ cout<<"safe"<<endl; } }
ALGO
0.998977
3.678883
805681e7-70de-4f35-bf62-359e6dd550b2
menyf/Code-Snippet
ACM-ICPC/POJ3164.cpp
// Wrote by MenYifan on 2016-09-05 14:06:59 // Exe.Time 110ms Exe.Memory 752K #include <set> #include <map> #include <stack> #include <cmath> #include <queue> #include <cstdio> #include <string> #include <vector> #include <iomanip> #include <bitset> #include <cstring> #include <iostream> #include <iosfwd> #include <deq...
ALGO
0.999724
3.674891
81871e9a-1e08-41dc-a8fc-36ba6e11ffbb
Wohlstand/ail2-sandbox
dosbox/tools/bc/TVISION/HELP/TVHC.CPP
/*-----------------------------------------------------------------------*/ /* */ /* Turbo Vision 1.0 */ /* Turbo Vision Help Compiler Source File */ /* ...
TOOL
0.888529
4.94638
b1db2c98-5f50-4bcd-81bb-f2689d5f98af
bcswieder117/Misc-CPP-Programming
Reverse String.cpp
/* Blaine Swieder October 12th, 2024 This code is used to reverse a string. File name: Reverse String */ #include<iostream> using namespace std; void reverseArray(int arr[], int n){ int start = 0; int end = n - 1; while (start < end){ swap(arr[start], arr[end]); start++; end--...
ALGO
0.995967
6.03235
909c8b36-23c2-4b92-b731-6d38c38c96f6
NucleaPeon/qt5-sle
qtbase/src/widgets/styles/qdrawutil.cpp
#include "qdrawutil.h" #include "qbitmap.h" #include "qpixmapcache.h" #include "qpainter.h" #include "qpalette.h" #include <private/qpaintengineex_p.h> #include <qvarlengtharray.h> #include <qmath.h> #include <private/qhexstring_p.h> QT_BEGIN_NAMESPACE /*! \headerfile <qdrawutil.h> \title Drawing Utility Func...
TOOL
0.864573
6.6324
935daf69-7f6e-406d-8649-5805dbcdb074
nns503/ProblemSolving_NS_CPP
프로그래머스/lv1/17681. [1차] 비밀지도/[1차] 비밀지도.cpp
#include <bits/stdc++.h> using namespace std; int a1[17][17]; int a2[17][17]; vector<string> solution(int n, vector<int> arr1, vector<int> arr2) { vector<string> as; for(int i=0; i<n; i++){ for(int j=0; j<n; j++){ a1[i][j] = arr1[i] % 2; a2[i][j] = arr2[i] % 2; arr1...
ALGO
0.999984
4.072949
ca24dd60-1087-4b0c-ab1f-8ffc087499bf
akshitahuja888/AtCoder-DP-Solutions
Knapsack1.cpp
#include<bits/stdc++.h> using namespace std; #define ff first #define ss second #define int long long #define pb push_back #define ppb pop_back #define mp make_pair #define pii pair<int,int> #define vi vector<int> #define mii ...
ALGO
0.999966
4.197197
a0eafa19-8316-4f2a-9632-2d03766d1a2e
ccerbusca/ubb-cs
Parallel and Distributed Programming/Lab2/main.cpp
#include <iostream> #include <condition_variable> #include "ThreadSafeQueue.hpp" #include <limits> void scalarProduct(std::vector<int>& a, std::vector<int>& b) { if (a.size() != b.size()) throw std::exception("Vectors of different sizes"); ThreadSafeQueue<int> threadSafeQueue = ThreadSafeQueue<int>(5);...
ALGO
0.993722
4.340666
03667ac9-e514-4dc0-aff6-34e99f9b2038
ishandutta2007/codeforces
stgatilov/normal/51/D.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstring> #include <c...
ALGO
0.999896
3.433954
a7afde57-ca0c-494b-87ae-7c9e29ebe5ba
MennatullahTarek/OOP-CPP
Solve_Book/Chapter 7/Chapter7_cpp_Q1/main.cpp
/*Q1: Write a function called reversit() that reverses a C-string (an array of char). Use a for loop that swaps the first and last characters, then the second and next-to-last characters, and so on. The string should be passed to reversit() as an argument. Write a program to exercise reversit(). The program should get ...
ALGO
0.996183
5.514371
6a449466-16a1-48b5-b2f5-a1261d5bb4f8
tenstorrent/ronin
yari/op/src/conv/device/tanto/basic_batch_bias_math.cpp
void matmul_slice( math<T> acc, pipe<T> px, pipe<T> pw, uint32 idst, uint32 tiles) { for (uint32 i = 0; i < tiles; i++) { acc.matmul(px, pw, i, i, idst, true); } } void kernel( pipe<T> px, pipe<T> pw, pipe<T> pb, pipe<T> py, ...
ALGO
0.99701
3.346446
6dbddd1a-26f4-4ea0-9ebb-6f45df144705
ApolloMonasa/DS
Algorithm_AND_DataStructure/Class/TAtcoder/pm2-9/7.B.cpp
/************************************************************************* > File Name: 7.B.cpp > Author: > Mail: > Created Time: Sun 09 Feb 2025 03:27:55 PM CST ************************************************************************/ #include <iostream> #include <unordered_map> using namespace std; int main(...
ALGO
0.999991
5.506883
211cd633-a87f-4aa8-a5b6-8fd5e7826699
THU-DSP-LAB/llvm-project
clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp
#include "clang/DirectoryWatcher/DirectoryWatcher.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Testing/Support/Error.h" #include "gtest/gtest.h" #include <condition_variable> #include <future> #include <mutex> #include <thread> using namesp...
TEST
0.91162
7.852261
7f90883d-3540-4439-8be1-f6eb3767dcb9
nazfisa/Problem-Solving
uri/1116.cpp
#include<bits/stdc++.h> using namespace std; int main() { int i,n; double a,b,sum; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%lf %lf",&a,&b); if(b==0) { cout<<"divisao impossivel"<<endl; } else { sum=(a/b); ...
ALGO
0.999528
3.358837
6d5feedf-2d6d-46a7-9c80-c468ac8ef394
Arthur1/abc
abc134/a/main.cpp
#include <bits/stdc++.h> #include <unistd.h> using namespace std; int main() { int r; cin >> r; cout << 3 * r * r << endl; return 0; }
ALGO
0.996161
3.09487
1c6a7dcd-d7d5-459b-8719-1777298e5f0e
ishandutta2007/codeforces
littlecube/normal/1638/E.cpp
/* | | _ _ | | _____ | | // | | _ | | | | | | _____ / ___|__ __| |___ _____ // | | |_|[ ][ ]| |/ _ \| | | | | | _ \/ _ \ // | L__| | | |_ | |_| || ____|| |___ | |_| | |_| || ____| // L____|_| |___||___|_|\_____|\_____|\_____/\____/\_____| // Segment Tree is hard. */ #pr...
ALGO
0.999428
5.150828
05a3905c-4910-4946-8b99-8f4ffeb1f81a
rohanxxx/leetcode
0695-max-area-of-island/0695-max-area-of-island.cpp
class Solution { public: int n, m; vector<vector<int>> d_xy = {{1,0}, {-1,0}, {0,1}, {0,-1}}; void dfs(int i, int j, int& curArea, vector<vector<int>>& grid){ grid[i][j] = 0; //marks as visited for(auto xy: d_xy){ int adjr = i+xy[0]; int adjc = j+xy[1]; if...
ALGO
0.999962
6.55875
436a2445-19bf-43ad-a50f-5c5c4072488b
beslirum/Simulated_Annealing_cities-in-turkey
psuedocode.cpp
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <random> // Şehir koordinatlarını temsil eden yapı struct City { int x, y; }; // İki şehir arasındaki Öklid mesafesini hesaplayan fonksiyon double distance(const City& a, const City& b) { return std::sqrt(std::pow(a.x - b.x...
ALGO
0.999991
6.011544
9f13d1d8-456f-4b26-8296-8b2b6e0b0053
lllsha512lll/Leetcode
167. Two Sum ll - Input Array is Sorted.cpp
class Solution { public: vector<int> twoSum(vector<int>& numbers, int target) { int left = 0, right = numbers.size()-1; while(numbers[left] + numbers[right] != target){ int sum = numbers[left] + numbers[right]; if( sum > target) right--; else if(sum < target) lef...
ALGO
0.999971
6.312521
15760908-6500-4759-b5d9-1cc13de86593
oshinoooo/leet_code
problems2013/main.cpp
#include <iostream> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <cctype> #include <numeric> #include <math.h> using namespace std; class DetectSquares { public: void add(vector<in...
ALGO
0.992768
5.497759
c40cf9dd-9fd8-46c4-a970-7a53cc4b80e9
NaiveBones77/lr3
lr2/linearalgebra.cpp
#include "linearalgebra.h" vector::vector(){ this->resize(0); } vector::vector(int size){ this->resize(size); } vector::vector(const vector & rVector) { this->data.assign(rVector.data.begin(), rVector.data.end()); } void vector::resize(int size) { assert(size >= 0); this->data.resize(size); } i...
TOOL
0.960806
3.722152
faad3495-d3be-4414-8947-a5db4f760d54
Eclipse-desu/Mandelbrot
src/colored.cpp
#include <cmath> #include <cstdio> #include <complex> #include <cstring> #include "../include/bmp.h" std::complex<double> convert(int x, int y, int unit) { return std::complex<double>((double)x / unit, (double)y / unit); } COLOR_RGBA *colorset; COLOR_RGBA gradient_mode(int num) { if (num == 255) return colorset[1...
ALGO
0.962283
4.165945
b87364c0-fab6-4d7d-9f5a-2e62bd6f9246
tixidi/ros_stent_graft
iiwa_visual_servoing/src/iiwaControl/iiwa/Eigen-3.3.3/unsupported/doc/examples/MatrixSquareRoot.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); MatrixXd A(2,2); A << cos(pi/3), -sin(pi/3), sin(pi/3), cos(pi/3); std::cout << "The matrix A is:\n" << A << "\n\n"; std::cout << "The matrix square root of A is:...
ALGO
0.999328
3.930508
d1471459-685e-4a18-8ec3-5921332bef7b
ishandutta2007/codeforces
heno239/normal/618/D.cpp
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<iostream> #include<string> #include<cstdio> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #inc...
ALGO
0.99945
4.057988
106ef6df-976a-4c81-9e9e-04a538ba1403
Hadi-susant0/Algo22
laporan 6 (Pengulangan)/pratik5_6.cpp
#include <iostream> using namespace std; #define MAX 5 int main(){ int i = 0; while (i < MAX){ for (int j = 0; j <= i; j++) { cout << '*'; } cout << endl; i++; } }
ALGO
0.999642
3.493574
c98b593e-11be-4245-b3e6-3fca0d87d6ac
yymin1022/Algorithm_Study
BOJ/13458.cpp
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); int N; cin >> N; vector<int> arr; for(int i = 0; i < N; i++){ int input; cin >> input; arr.push_back(input); } int B, C; cin >> B >> ...
ALGO
0.999719
3.594693
6ef734dc-95e7-4573-b151-80e6b9320c8d
LeoBec2005/test
aed_AVLtree_exercise_1.cpp
#include <iostream> #include <cstdlib> #include <vector> #include <queue> #include <cmath> #include <functional> #include <SFML/Graphics.hpp> #include <unordered_map> #include <unordered_set> struct Node { int data; Node* left = nullptr; Node* right = nullptr; int height = 1; }; struct CAVLTree { ...
ALGO
0.999598
5.563168
4b475b9f-4723-42ef-8052-2d7755627dfc
sicilydefense/openvino
src/plugins/intel_npu/src/plugin/npuw/partitioning/patterns/compute.cpp
#include "compute.hpp" #include "../../logging.hpp" #include "../online/group.hpp" // online::Group #include "../online/snapshot.hpp" // online::Snapshot #include "openvino/op/ops.hpp" #include "openvino/pass/pattern/op/label.hpp" // any_input #include "openvino/pass/pattern/op/optional.hpp" #include "openvino/p...
TOOL
0.926794
6.237468
7507e02e-eb2a-446d-b842-6d15494abbbe
yu-community-os/android_frameworks_av
media/libstagefright/codecs/amrnb/enc/src/cor_h.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/cor_h.c Date: 06/12/2000 ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated template used to PV coding template. First attempt a...
ALGO
0.999915
3.957385
deefd3f4-46cc-4f10-b05b-f885b92cfe68
MTDuke71/ChessAI
test/Depth5Analysis.cpp
#include <iostream> #include <vector> #include <string> #include "Board.h" #include "FastMoveGenerator.h" #include "MoveGenerator.h" #include "Perft.h" uint64_t fastPerft(Board& board, FastMoveGenerator& gen, int depth, bool isWhite, const std::string& prefix = "") { if (depth == 0) return 1ULL; FastMoveG...
ALGO
0.995222
7.599682
dfcd5a2d-e760-4174-bf00-c629634bd97a
hisyamsk/tlx-toki
pemrogaman-dasar/07 Perulangan Lanjut/7_b.cpp
#include <iostream> #include <cmath> #include <string> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { if (i % 10 == 0) { continue; } else if (i == 42) { cout << "ERROR" << endl; break; } else { cout << i << endl; } }
ALGO
0.998373
4.240512
50561de6-b480-452f-a61e-925998cb3db8
obfuscated/codeblocks_sf
src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfgraphics.cpp
/// \file pdfgraphics.cpp Implementation of the wxPdfDocument graphics primitives // For compilers that support precompilation, includes <wx/wx.h>. #include <wx/wxprec.h> #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include <wx/wx.h> #endif #include <wx/tokenzr.h> #include "wx/pdfcoonspatchmesh.h...
TOOL
0.887365
4.822363
38951aea-065f-409b-8e2b-6a3d907caabf
vedang1/100Daysofcode
Day_90_Merge_Sort_on_Doubly_Linked_List.cpp
class Solution { public: // Function to sort the given doubly linked list using Merge Sort. struct Node *sortDoubly(struct Node *head) { // Your code here vector<int> num; struct Node *temp = head; while(temp != NULL){ num.push_back(temp->data); temp = t...
ALGO
0.999961
5.287137
829173c7-1d23-4116-a36c-8dbfcb436747
NikhilGupta777/INTERNSHIP-JULY-MIET-2024
DAY 15/STRING FUNCTIONS/Duplicate.cpp
// // finding duplicate string without using stl library // #include <iostream> // #include <vector> // #include <string> // using namespace std; // void findDuplicate(string str) // { // vector<char> v; // for (int i = 0; i < str.length(); i++) // { // if (v.size() == 0) // { // ...
ALGO
0.997743
3.927938
df1618fd-b2f8-4cfc-8aab-3c027e321207
hycinth22/algorithm-notes-practices-solutions
1入门模拟/字符串处理A1001/字符串处理A1001.cpp
// 字符串处理A1001.cpp // #include <iostream> #include <iomanip> #include <vector> using namespace std; int main() { int a, b; cin >> a >> b; int sum = a + b; if (sum < 0) { // 注意负数 cout << "-"; sum = -sum; } if (sum < 1000) { cout << sum << endl; return 0; } vector<int> v; while (sum != 0) { v.push_back...
ALGO
0.999532
4.244112
3c92e02f-2043-4483-a35b-70bd54d713d2
HANDONGLJH/HANDONGLJH
13weeks/.ccls-cache/@home@runner@12weeks/DS033.cpp
#include <iostream> #include <string> using namespace std; // 쿠폰 정보를 담는 구조체 정의 struct Coupon { int rank; string reward; }; // 쿠폰 관리를 위한 스택 클래스 정의 class CouponStack { private: int maxsize; int top; Coupon *list; public: CouponStack(int size = 10) : maxsize(size), top(-1) { list = new Coupon[maxsize];...
TOOL
0.968603
6.045644
7e895acc-c051-4312-9b8a-fb4457b7621c
nfproc/reversi_board
C_src/hough_only/reversi_accel.cpp
// #include "/tools/Xilinx/Vivado/2021.1/include/gmp.h" #include "hls_stream.h" #include "ap_int.h" #include "common/xf_common.hpp" #include "common/xf_utility.hpp" #include "imgproc/xf_houghlines.hpp" #include "reversi_accel.hpp" static constexpr int __NUM_PIXEL = HEIGHT * WIDTH; static constexpr int __NUM_LINES = LI...
ALGO
0.973049
4.635938
4cc55830-8803-479c-aa26-db2c67616341
raincross7/code-similarity
codes/train_code/problem207/problem207_269.cpp
#include<bits/stdc++.h> using namespace std; bool judge(int y, int x, int H, int W, vector<vector<char>> &grid){ if(y-1>=0){ if(grid.at(y-1).at(x) == '#')return true; } if(y+1<=H-1){ if(grid.at(y+1).at(x) == '#')return true; } if(x-1>=0){ if(grid.at(y).at(x-1) == '#')return ...
ALGO
0.999989
5.381249
1072755c-f051-4292-bd9b-d0e9d8fcf369
shivgupta198922/HACKEREARTH-MASTER
Algorithms/Graphs/Depth first search/Surveillance.cpp
#include<bits/stdc++.h> using namespace std; int dp[200001][2], n; vector<vector<int>> tree; int checker(int src, int par, int has) { if(dp[src][has] != -1) return dp[src][has]; int ans = 0; for(auto &edge : tree[src]) { if(edge != par) { int res; if(has)...
ALGO
0.999962
4.737808
60262d9e-cad5-4461-99e2-2ead50ebeb54
kokosabu/atcoder
cpp/abc235_a/main.cpp
#include <iostream> using namespace std; int main() { char a; char b; char c; cin >> a >> b >> c; int ia = a - '0'; int ib = b - '0'; int ic = c - '0'; cout << ia*100 + ia*10 + ia + ib*100 + ib*10 + ib + ic*100 + ic*10 + ic << endl; return 0; }
ALGO
0.995799
3.809454
cc5e843b-8aeb-4024-853f-5a04e2260dc1
batsalee/Baekjoon_Programmers
프로그래머스/0/181898. 가까운 1 찾기/가까운 1 찾기.cpp
#include <vector> #include <algorithm> using namespace std; int solution(vector<int> arr, int idx) { int answer = find(arr.begin() + idx, arr.end(), 1) - arr.begin(); return answer >= arr.size() ? -1 : answer; }
ALGO
0.999806
5.141456
4f8c3da5-ed12-436e-ae01-664ce54541db
bupt-pris/opencv-mirror
modules/imgproc/src/subdivision2d.cpp
#include "precomp.hpp" namespace cv { int Subdiv2D::nextEdge(int edge) const { CV_DbgAssert((size_t)(edge >> 2) < qedges.size()); return qedges[edge >> 2].next[edge & 3]; } int Subdiv2D::rotateEdge(int edge, int rotate) const { return (edge & ~3) + ((edge + rotate) & 3); } int Subdiv2D::symEdge(int ...
ALGO
0.995424
4.960033
a1977692-ce5b-437e-8852-9feeb7c9a621
uhhernadez/programacion-ingenieria2022A
05_switch/02_problema1.cpp
#include <iostream> using namespace std; int main () { int a, b; cout << "Dame el valor a: " << endl; cin >> a; cout << "Dame el valor b: " << endl; cin >> b; char operacion; cout << "Que operacion quieres realizar?" << endl; cout << " '+' sumar " << endl; cout << " '-' restar " << endl; cout << " '...
ALGO
0.97103
3.04221
9b6cfdbc-4737-41b7-9e6b-2e29a57f3ee7
Aronnok093/Online-Judge
Light oj/1259.cpp
#include<bits/stdc++.h> using namespace std; #define maxi 10000000 vector<int>arr; vector<bool>arr1(maxi+2,0); void GP(){ arr1[0]=true; arr1[1]=true; for(int i=2;i<=maxi;i++){ if(arr1[i]==false){ arr.push_back(i); for(int j=i*2;j<=maxi;j+=i) arr1[j]=true; } ...
ALGO
0.999546
4.035575