Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
#include
#include
#include
#include
#include
using namespace std; int prefs[1000][1000]; int query(int row, int i, int j) { if(i == 0) { return prefs[row][j]; } return prefs[row][j] - prefs[row][i - 1]; } int main() { int n,q; cin>>n>>q; char x[n][n]; int y[n][n]; for(int i =0;i
>x[i][j]; } } for(int i =0;i
>x1>>y1>>x2>>y2; x1--; x2--; y1--; y2--; for(int j =x1;j<=x2;j++){ int x=query(j,y1,y2); sum+=x; } cout<
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)