1#include <bits/stdc++.h> // includes most of the useful libraries
6/* This C program was submitted to help bat
7 * with its syntax highlighting tests
10bool test_function(int x, int y)
12 return (x == y || x + y == x * y);
15MainWindow::MainWindow(QWidget *parent)
16 : QMainWindow(parent), ui(new Ui::MainWindow)
21 connect(ui->actionOpen, &QAction::triggered, this, &MainWindow::open);
22 MainWindow::~MainWindow()
26 int y = ui->graphicsView->size().height() - image.height();
27 int x = ui->graphicsView->size().width() - image.width();
29 void MainWindow::showImage()
32 ui->graphicsView->resetMatrix();
34 statusBar()->showMessage(QString("%1 %2x%3px %4 kB").arg(file.fileName()).arg(image.width()).arg(image.height()).arg(QFile(currentFile).size() / 1000.0));
42 while (tc--) // for each test case
46 vector<pair<int, string>> v;
50 for (int i = 0; i < n; i++)
51 cin >> a[i]; // take arrays
52 for (int i = 0; i < n; i++)
55 priority_queue<int> pq; // inbuilt data structure - max heap (available in the bits/stdc++)
57 for (int i = 0; i < n; i++)
58 pq.push(a[i]); // push elements into heap
60 for (int i = 0; i < n; i++) // for each element in B
62 int top_ele = pq.top(); // max element in heap
64 pq.push(top_ele ^ b[i]); // push after operation
67 for (int i = n - 1; i >= 0; i--) // restore A in ascending order
73 for (int i = 0; i < n; i++)
74 cout << a[i] << " "; // print A
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list