This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MAN_H | |
#define MAN_H | |
#include <QObject> | |
#include <QPixmap> | |
#include <QPainter> | |
class Man : public QObject{ | |
Q_OBJECT | |
public: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Game.h" | |
Game::Game(QWidget *parent) | |
: QWidget(parent) | |
{ | |
setFixedSize(800, 600); | |
man = new Man(200, 200); | |
QObject::connect(man, SIGNAL(PositionChange(int,int)), parent, SLOT(ChangeLCD(int, int))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef GAME_H | |
#define GAME_H | |
#include <QWidget> | |
#include <QPainter> | |
#include <QTimer> | |
#include <QPaintEvent> | |
#include <QKeyEvent> | |
#include "Man.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mainwindow.h" | |
#include <QApplication> | |
#include "Game.h" | |
int main(int argc, char *argv[]) | |
{ | |
QApplication a(argc, argv); | |
MainWindow *w = new MainWindow; | |
Game *g = new Game(w); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <algorithm> | |
using namespace std; | |
string str[105]; | |
int pi[105]; // prefix index for substring | |
int pi_inverse[105]; // prefix index for inverse substring | |
void Prefix(const string &P, int pi[]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
string W, T; | |
int pi[10001]; // prefix index for W string | |
void Compute_pi(); | |
int KMP(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstring> | |
#include <vector> | |
#include <queue> | |
#include <algorithm> | |
using namespace std; | |
#define INF 99999999 | |
#define MAXN 205 | |
vector<int> edge[MAXN]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <queue> | |
#include <vector> | |
#include <cstring> | |
#include <algorithm> | |
using namespace std; | |
#define INF 9999999999999 | |
#define eps 0.00000000001 | |
vector<int> edge[50]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstring> | |
#include <queue> | |
#include <vector> | |
using namespace std; | |
#define INF 9999999 | |
#define MAX 2*52*52+10 | |
vector<int> edge[MAX]; | |
int cap[MAX][MAX], flow[MAX][MAX]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstring> | |
#include <vector> | |
#include <queue> | |
#include <algorithm> | |
using namespace std; | |
#define INF 999999 | |
using llt = long long int; | |
llt N, M, D, K; |
NewerOlder