Skip to content

Instantly share code, notes, and snippets.

View GiangHoGoVap's full-sized avatar
🏠
Working from home

GiangHoGoVap GiangHoGoVap

🏠
Working from home
  • Ho Chi Minh City, Viet Nam
View GitHub Profile
import 'package:flutter/material.dart';
class HeaderWithSearchBox extends StatelessWidget {
const HeaderWithSearchBox({
Key key,
@required this.size,
}) : super(key: key);
final Size size;
@override
Widget build(BuildContext context) {
int main()
{
FragmentLinkedList<int> test(5);
for (int i = 0; i < 20; i++)
{
test.add(i, i * i + 10);
}
cout << test.toString() << endl;
//FragmentLinkedList<int>::Iterator it = test.begin();
FragmentLinkedList<int>::Iterator it = test.end(2);
int main()
{
FragmentLinkedList<int> test(10);
for (int i = 0; i < 20; i++)
{
test.add(i, i * i + 10);
}
cout << test.toString() << endl;
//FragmentLinkedList<int>::Iterator it = test.begin();
auto it = test.begin();
int main(){
FragmentLinkedList<int> test(10);
for (int i = 0; i < 20; i++)
{
test.add(i, i * i + 10);
}
cout << test.toString() << endl;
//FragmentLinkedList<int>::Iterator it = test.begin();
auto it = test.begin();
auto it2 = test.begin(1);
int main(){
FragmentLinkedList<int> List;
List.add(0);
List.add(100);
List.removeAt(0);
List.removeAt(0);
cout << List.toString() << "\n";
List.clear();
List.add(0);
List.add(100);
int main(){
FragmentLinkedList<int> fList(20);
for(int i=0; i<200; i++){
fList.add(i);
}
for(auto it = fList.begin(); it != fList.end(); it++){
if(*it % 5 == 1 || *it % 4 == 0 || *it % 3 == 2 || *it % 7 == 2){
it.remove();
}
}
int main(){
FragmentLinkedList<int> fList(4);
fList.add(0, -23);
fList.add(0, -46);
fList.add(0, -100);
fList.removeAt(2);
cout << ">Expected: [-100, -46]\n Got: " << fList.toString() << "\n";
//////////
int main(){
FragmentLinkedList<int> list;
cout << "size of list1: " << list.size() << endl;
FragmentLinkedList<int> fList = FragmentLinkedList<int>();
for(int i = 0; i < 20 ; i++)
fList.add(i * i);
for(FragmentLinkedList<int>::Iterator it = fList.begin(); it != fList.begin(1); it++)
{
cout << *it << " ";
}
int main(){
FragmentLinkedList<int> testLinkedList(3);
for (int i = 1; i <= 10; i++)
{
testLinkedList.add(i);
}
cout << "The initialization: "<< endl;
cout << testLinkedList.toString();
cout << "\n-------------------------------\n";
@GiangHoGoVap
GiangHoGoVap / main.cpp
Last active August 4, 2025 09:20
Main file for solving ITC-2007 (Track 3)
#include <iostream>
#include <unordered_set>
#include "header/openGA.hpp"
#include "header/faculty.h"
using namespace std;
Faculty* faculty = nullptr;
vector<vector<bool>> room_occupancy;
vector<vector<bool>> course_period_assigned;